SSH Login without Password (RHEL 5.4)

for root user

  • [root@A ~]vi /etc/hosts

#[IP address] [hostname]

192.168.1.X A

192.168.1.Y B

  • generate authentication keys and distribute

[root@A ~]# ssh-keygen -t rsa

[root@A ~]# cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys

[root@A ~]# scp ~/.ssh/* root@B:~/.ssh/

  • check

[root@A ~]# ssh B

[root@A ~]# ssh A

for non-root users

  • just like what has to do for root user

posted on 2011-11-07 16:44  snigoal  阅读(282)  评论(0编辑  收藏  举报