SSH設置不輸入密碼登陸方式

 

--設置ssh不輸入密碼的方式登陸   
[root@mod .ssh]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
7a:59:b7:b9:fc:a5:7c:dd:3c:5f:f8:8d:17:e7:4f:c4 root@mod
[root@mod .ssh]#  cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
[root@mod .ssh]#  scp ~/.ssh/authorized_keys 192.168.0.22:~/.ssh/authorized_keys
The authenticity of host '192.168.0.22 (192.168.0.22)' can't be established.
RSA key fingerprint is ce:ff:6e:a8:e1:ff:32:71:02:3c:c4:ad:8e:77:ff:0e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.22' (RSA) to the list of known hosts.
[email protected]'s password:
authorized_keys                                                                100%  218     0.2KB/s   00:00   
[root@mod .ssh]# ssh 192.168.0.22
Last login: Fri Sep 25 23:58:16 2009 from 192.168.0.120
[root@CRBTDB ~]# exit

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章