posts - 88, comments - 3, trackbacks - 0, articles - 0
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

Use ssh-copy-id avoid inputing password

Posted on 2012-05-11 09:58 Milo的海域 阅读(310) 评论(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就可以用了。

以前都是手动复制粘贴的...

只有注册用户登录后才能发表评论。


网站导航: