Quote:
Originally Posted by
kavish11
Oh ok. Now i get it. When i try to connect to a server, the server will send me its public key from/etc/ssh. But what is the purpose of the keys from ~/.ssh ? It seems like they are not used.
~/.ssh/known_hosts is used by the client alone, to identify servers the client has connected to before.
~/.ssh/authorized_keys is used by the server being connected to, when you ssh into that user using a key. So in that sense it's still a client setting, though it's the server which must read it.
~/.ssh/id_rsa, ~/.ssh/id_rsa etc are used by a client when connecting to a server. That is the file which the server you're connecting to recognizes via the other end's ~/.ssh/authorized_keys . There's various kinds of possible keys, some obsolete, some modern, so there's actually a few different names ssh will use by default there.
I'm sure there's other things which may end up in ~/.ssh/ also. It's a place for client settings, not something simple and single-purpose.