您的位置:首页 > 运维架构 > Shell

Xshell设置密钥登录CentOS6.5_64位(文字命令版)

2017-12-26 17:05 211 查看
1、新建/root/.ssh目录
mkdir /root/.ssh
2、创建authorized_keys文件
vi /root/.ssh/authorized_keys
3、复制公钥内容保存
:wq
4、设置authorized_keys权限
/bin/chmod 600 /root/.ssh/authorized_keys
5、修改/etc/ssh/sshd_config
vi /etc/ssh/sshd_config
原内容:
#RSAAuthentication yes
#PubkeyAuthentication yes
PasswordAuthentication yes
更改为:
RSAAuthentication yes
PubkeyAuthentication yes
PasswordAuthentication no
6、重新启动SSH
/etc/init.d/sshd restart


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