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

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

  

原文地址:https://www.cnblogs.com/aipeli/p/8118958.html