Posted on 2012-05-11 09:58
Milo的海域 閱讀(320)
評論(0) 編輯 收藏 所屬分類:
Linux
ssh-copy-id 避免ssh輸入密碼的用法:
[root@hengtiandesk118 .ssh]# ssh-copy-id -i id_rsa.pub 10.1.186.51
10
Warning: Permanently added '10.1.186.51' (RSA) to the list of known hosts.
root@10.1.186.51's password:
Now try logging into the machine, with "ssh '10.1.186.51'", and check in:
.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
[root@hengtiandesk118 .ssh]# ssh 10.1.186.51
Last login: Thu May 10 18:33:55 2012 from 10.5.4.201
[root@xen186v01 ~]#
這個腳本只要裝了openssh-clients就可以用了。
以前都是手動復(fù)制粘貼的...