To be frank even though my host is Windows , my work normally happens in solaris/Linux boxes. For this I use Exceed as my remote login tool.

It was during while setting up the boxes I went through the SSh stuffs. After then even though I type daily atleast 10 times ssh command, I forgot the steps what happens internally .Its reallly bad right.So just thought of going through the basics of it and got landed at right place.

The basic steps are as follows:

1: Public and Private keys exist on the SSH server.(let's say They were generated by the server Admin at the time SSH was first set up.

2: A user ( attempts to ssh into the server ( The server sends its PUBLIC KEY to the user.

3: The user checks to see if the PUBLIC KEY exists already in its system. If not, the user is warned that this key is not in the system. Once the user accepts the key, it is added to the trusted list.

4: The user ( uses the server's PUBLIC KEY to encrypt all communications to the server ( At the initial stage, this would include user name, password.

5: The user ( also sends it's PUBLIC KEY to the server. (This is NOT the same as the Server's PUBLIC KEY). This is generated newly per every new SSH session(??)

6: The server uses it's own PRIVATE KEY to decrypt all communications from the user. (Which the user encrypted using the server's PUBLIC KEY) The server then uses the user's PUBLIC KEY to encrypt all communications before sending them on to the user.

7: The user then uses it's PRIVATE KEY to decrypt all communications send by the server. (Which the server encrypted using the user's PUBLIC KEY)

8: No one other than the server can decrypt packets encrypted with the server's PUBLIC KEY (Because only the server knows its own PRIVATE KEY).

9: No one other than the client can decrypt packets encrypted with the client's PUBLIC KEY (Because only the client knows its own PRIVATE KEY)

10: Points 8 & 9 work because the PUBLIC and PRIVATE keys are both huge primary numbers that are mathematically related, but would require an unimaginable number of calculations/computing power to derive one from the other.

In reference to: [other] How does SSH Work? - Ubuntu Forums (view on Google Sidewiki)

Related Posts :

Bookmark and Share