From Linux machine
[humblejo@homebox .ssh]$
Generate public/private dsa key pair
ssh-keygen -t dsa
chmod 600 id_dsa id_dsa.pub
scp id_dsa.pub root@servermachine:/root/.ssh/tmpkey
[root@servermachine .ssh]#
cat tmpkey >> authorized_keys
[humblejo@homebox ~]$
ssh root@servermachine
ssh login without password is done...
From Windows machine
1. Download windows SSH client package PuTTY 0.60 from here
2. use puttygen.exe to generate public/private dsa key pair
2.a. Type of key to generate: SSH-2 DSA
2.b. Number of bits in a generated key: 1024
3. save private key without passphrase protection
4. Add pagent.exe on startup and add host private key on it
5. Add public key in the server machine
5.a. [root@servermachine ~]#
ssh-keygen -i -f tmpkey >> /root/.ssh/authorized_keys
6. PuTTY configuration -> Connection -> Data
--> Auto-login user name ==> "root"
Reference:
http://www.hostingrails.com/HowTo-SSH-SCP-without-a-password
No comments:
Post a Comment