I am running a Selenium Hub from my local PC and now I am trying to register a node from an ec2 instance via SSH. This is how I ran my Hub:
java -jar -Dwebdriver.chrome.driver=C:\\Users\\NROLL97\\Documents\\chromedriver.exe selenium-server-standalone-3.141.59.jar -role hub -port 4444
This is how I can tell it worked:

I am SSH'ed into my ec2 instance and I tried the following:
java -jar selenium-server-standalone-3.141.59.jar -role node -port 5555 -hub http://192.168.86.31:4444/grid/register
But this is what I get back:
I read that it might have something to do with AWS blocking port 4444 so I tried editing this in AWS console like this:

but still nothing. How can I get this node to register? When I make the node on my local PC then it works just fine.
But like this the node doesn't actually get registered.
EDIT: I also tried the following:
- Started the HUB:
java -jar selenium-server-standalone-3.141.59.jar -role hub
19:04:08.076 INFO [GridLauncherV3.lambda$buildLaunchers$5] - Launching Selenium Grid hub on port 4444
2020-09-11 19:04:08.411:INFO::main: Logging initialized @562ms to org.seleniumhq.jetty9.util.log.StdErrLog
19:04:08.773 INFO [Hub.start] - Selenium Grid hub is up and running
19:04:08.773 INFO [Hub.start] - Nodes should register to http://192.168.86.31:4444/grid/register/
19:04:08.773 INFO [Hub.start] - Clients should connect to http://192.168.86.31:4444/wd/hub
- Started the node from an ec2 instance that I am SSH'ed into:
java -jar selenium-server-standalone-3.141.59.jar -role node -hub http://192.168.86.31:4444/grid/register
]java -jar selenium-server-standalone-3.141.59.jar -role node -hub http://192.168.86.31:4444/grid/register
23:16:40.963 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
23:16:41.167 INFO [GridLauncherV3.lambda$buildLaunchers$7] - Launching a Selenium Grid node on port 11391
2020-09-11 23:16:41.302:INFO::main: Logging initialized @698ms to org.seleniumhq.jetty9.util.log.StdErrLog
23:16:41.666 INFO [WebDriverServlet.<init>] - Initialising WebDriverServlet
23:16:41.795 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 11391
23:16:41.799 INFO [GridLauncherV3.lambda$buildLaunchers$7] - Selenium Grid node is up and ready to register to the hub
23:16:41.918 INFO [SelfRegisteringRemote$1.run] - Starting auto registration thread. Will try to register every 5000 ms.
It looks like it just keeps trying but never connects. I I go to the grid console then I can see that there are no nodes connected, its blank.
