使用crt链接centos虚拟机时,链接不上,但是虚拟机ping百度是正常的,怀疑是ssh链接功能存在问题,于是找个一个正常的设备ssh root@ip远程虚拟机报ssh拒绝链接,查看ssh 端口发现没有
于是重启ssh
/etc/init.d/sshd start 报以下错误
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for ‘/etc/ssh/ssh_host_rsa_key’ are too open
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key “/etc/ssh/ssh_host_rsa_key”: bad permissions
Permission denied (publickey).
/var/empty/sshd must be owned by root and not group or world-writable
通过查阅资料以下方法可以解决:
sudo chmod 600 文件路径 解决/etc/ssh/ssh_host_rsa_key权限问题
通过以下方法解决/var/empty/sshd权限的问题
chown -R root.root /var/empty/sshd
chmod 744 /var/empty/sshd
service sshd restart