Showing results for 
Search instead for 
Do you mean 
Our staff are currently offline, but you can use the community 24/7
Remember to accept a reply to your question as the answer!
Reply

How does an incoming SSH connection request to a public IP a

[ Edited ]

Let's say I have two machines mA (Private ip: 192.168.0.3) and mB (Private ip: 192.168.0.4) within the same LAN whos public IP address is 2.2.2.2. These machines both have users with common username root. Additionally, mA has user uA and mB has user uB.

I understand how ssh communication from mA or mB to another public IP 3.3.3.3 works. SSH from mA port 22 creates a NAT table in the router which corresponds to 2.2.2.2 port 22 as source address. So any incoming reply from ssh requests from 3.3.3.3 to 2.2.2.2 port 22 can be reverse translated to mA port 22. This is possible because of the existence of NAT table entry for mA.

Now, if any other server outside the LAN tries to ssh to mB using ssh root@2.2.2.2. How does the router know which machine in the LAN to send this SSH request? (Since there is nothing to identify mB in NAT table now. And both mA and mB have root).

Is it different from what happens when you try to ssh uB@2.2.2.2 where user uB only exists in mB?

0

Re: How does an incoming SSH connection request to a public

Explorer

This question is an exact copy from https://stackoverflow.com/questions/53638088/how-does-an-incoming-ssh-connection-request-to-a-public... where the answer is also given.

0
Announcements

At Three we are updating our systems to make your 3Community experience even better. From Friday the 24th of January, the forum.three.ie community will become read-only in preparation for launching a new and improved 3Community later this year

All our useful tips and information can still be viewed in the posts and blogs. Once the new 3Community is ready to go, you will be the first to know. If you are a current member and need help during this time, you can still drop us a private message or alternatively contact us on Facebook or Twitter

Thank you for all your contributions to 3Community and we are excited to welcome you to your new 3Community soon