您的位置:首页 > 其它

ubuntu ssh 无密码登录配置

2012-07-17 02:13 316 查看
1.执行 sudo vi /etc/ssh/ssh_config

对以下参数进行以下配置:

PubkeyAuthentication Yes


RSAAuthentication Yes


PermitRootLogin Yes


2.如果
ssh_config文件发生变化,需要重启ssh,

sudo /etc/init.d/ssh stop,start,restart

3.建立ssh无密码登陆

ssh-keygen –t dsa –P ’’ –f ~/.ssh/id_dsa

cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys.

4.测试

ssh localhost

如果不许要密码则说明登录成功!!!
本文出自 “码农也有春天” 博客,请务必保留此出处http://fuhua.blog.51cto.com/2919207/932907
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: