Tuesday, December 29, 2009

[tip]ssh key

Setup SSH without password.
a) execute "ssh-keygen -t rsa" under your linux/unix login to get the RSA keys.
(press Enter for all)
You will get 2 files uner ~/.ssh/, id_rsa and id_rsa.pub
b) Put the public key id_rsa.pub to your remote host: ~/.ssh/authorized_keys If the remote host share the same nfs, just try " cat id_rsa.pub >> ~/.ssh/authorized_keys"
* Remember to modify hostname or ip info in ~/.ssh/authorized_keys to "*", so that you can login from any host without password in your NIS domain.
For example:
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA4Ri5J0s1BL/+mR7RfAuDW6FY2P6ILc61Zvw1BdDkvHMFrTzaC/AUMw33H7biAMCXuCleakCuSoV8ZDiGHYs4wOVvet5sDmphkwdiC4xTekdl3dRNvGjMVbvFUta/Y5CiayL6YIu47Ro6Vvu4Mutsrv/13pTlifrEz+NTR/+bzMb9nTniCwiryMyYod3E46b8WvS8yE3WK+tH4BZE8bjiCwdvAzSdPyk/OFNrlBNuF1yewwnxv1roRD3UalT2+7O4kfEG9sMvvBHjuX2l7xlUe3stBftYpigBbwGmmadxjRpNIlk88t5xKcQX6nSu7V8HI3GWPHI0D+ISIlbfU5Sunw== kzhu0@*

No comments: