UNIX SSH Files


Public and Private Keys

Other Important Files

Prev/Next

Anything with a .pub is almost certainly a public encryption key. 'identity' and 'identity.pub' are the default names for version 1 keys while 'id_dsa' and 'id_dsa.pub' are the default names for version 2 keys. See the next slide for details.

Anything with a .pub is almost certainly a public

The authorized_keys file is a list of public keys. When someone with a private key and passphrase tries to connect to this account, each public key is compared. If one matches, the connection is allowed. Note: In the Advanced Topics section there are instructions on restricting public keys to allow matching private keys to authenticate only from certain machines or to only run certain programs.

SSH keeps a list with an identifier (known as a host key) for each server to which you connect. This is the known_hosts file. I'm noting the known_hosts file for two reasons. One is to explain the message that appears the first time you connect to any server (say yes and it will add the host key to the known_hosts list). The second is about the message you may get in the future when a server changes its host key. Link here to further info on this topic.

Again, in the Advanced Topics section there are instructions on advanced configuration of ssh - to handle managing multiple private keys and on setting defaults for connecting to a particular server (like username, automatic tunnel creation, etc.)