您的位置:首页 > 其它

suse11 ssh免密码登陆

2014-07-03 15:40 204 查看
ssh免密码登陆

1.

$ssh-keygen -t rsa

#生成RSA密钥对

2.

$ssh-copy-id -i ~/.ssh/id_rsa.pub hostname

#输入完密码后,会有如下输出

Now try logging into the machine, with "ssh 'linux-kc7s'", and check in:

  ~/.ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.

3.

$ssh hostname
#访问目标
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: