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

使用secureCRT连接linux虚拟机时出现“The remote system refused the connection.”

2013-06-14 18:13 525 查看
也同样是用为对某个文件误操作后出现的问题,当secureCRT报这个错并且IP可ping通说明linux没有启动sshd

可用ps -e |grep ssh 检查sshserver是否开启,发现只有ssh-agent则说明sshserver没有开启,这个时候可使用/etc/init.d/ssh start 开启。

但是又出现了新的问题:

开启不成功,又如下提示

permissions 0777 for '/etc/ssh/ssh_host_key'are too open

It is recommended that your private key files are not accessible by others

...ssh_host_rsa_key...

... ...

...ssh_host_dsa_key...

sshd: no hostkeys available -- exiting

这又是权限引发的血案,立刻修改

chmod 600 sshd_config ssh_host_dsa_key ssh_host_key ssh_host_rsa_key

chmod 520 moduli

chmod 644 ssh_config ssh_host_dsa_key.pub ssh_host_key.pub ssh_host_rsa_key.pub

service sshd start

到此问题才总算解决了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐