Tuesday, May 5, 2009

What is inside the .ssh folder

To go to your .ssh directory do the following -
misfit@mufasa:~/$ cd .ssh
After reaching inside the .ssh directory list the contents -

misfit@mufasa:~/.ssh$ ls -ltr -a
total 64
-rw-r--r-- 1 misfit far_away 622 2006-09-29 11:15 id_dsa.pub
-rw------- 1 misfit far_away 668 2006-09-29 11:15 id_dsa
-rw-r--r-- 1 misfit far_away 415 2008-09-03 17:28 id_rsa.pub
-rw------- 1 misfit far_away 1751 2008-09-03 17:28 id_rsa
drwxr-xr-x 60misfit far_away 36864 2009-04-29 17:48 ..
-rw-r--r-- 1 misfit far_away 1082 2009-05-05 14:27 known_hosts
-rw-r--r-- 1 misfit far_away 622 2009-05-05 14:30 authorized_keys
drwx------ 2 misfit far_away 4096 2009-05-05 14:30 .
The *.pub entries are the public keys that may be generated by you.
The id_* files are your private keys and are usually with permissions 600.
The file authorized_keys has information on the public keys for allowing
password less logging to this machine. The known_hosts file has
information about machines you had previously logged onto (including
public keys). Since machines change their public keys from time to time,
the public key entries in this file change and need to be amended.
Typical entry in a known_hosts file looks like -

misfit@mufasa:~/$more .ssh/known_hosts
node1-1,10.11.1.1 ssh-rsa AAAAB3NzaC1yc2EAAA
ABIwAAAIEAw3eXxgVyiF7UDkKGQ13WyIJ/J1h1
G3xmVVddYJyiHrpHD/LAjmqseQHHtImT+uGW
X8ngzwThGo1wavNBWN9E7GkIiAQ8EhKVJWfQ
f9xZhlrFvfO8Qe5Hyy3

Hope this was useful. If a public key is no longer valid.
Remove the appropriate entry from this file and re-login
to repopulate this entry.

0 comments:

Post a Comment