ssh: connect to host 192.168.58.129 port 22: Connection refused
1. 查看ssh服务端有没有安装html
ps -e|grep ssh
若是出现了sshd
,则表示已经安装ssh服务端,不然须要自行安装vim
2. 安装ssh服务端ssh
apt-get install openssh-server
3. 启动服务端程序code
/etc/init.d/ssh start
详细信息请参考:http://www.javashuo.com/article/p-ylyfnqok-go.htmlserver
出现以下问题:
这是因为ssh server端未赋予权限htm
1. 打开ssh的配置文件blog
vim /etc/ssh/sshd_config
2. 对配置文件作以下修改
将以下一行get
PermitRootLogin prohibit-password
改为:虚拟机
PermitRootLogin yes #prohibit-password
3. 若是一样想 `ssh root@x.x.x.x
将以下一行:it
#UserLogin yes
改为:(即去掉注释)
UserLogin yes
4. 最后效果: