scp ssh: connect to host 192.168.6.129 port 22: Connection refused lost connection

scp ssh: connect to host 192.168.6.129 port 22: Connection refused lost connection

一、对方主机未安装ssh-server

1. 查看是否有sshd进程

ps -e | grep ssh

scp ssh: connect to host 192.168.6.129 port 22: Connection refused lost connection

2. 安装openssh-server

sudo apt-get install openssh-server

3. 如果安装了,但是没有sshd进程,可以重启

/etc/init.d/ssh restart

 

二、如果之后,再提示Permission denied, please try again

scp ssh: connect to host 192.168.6.129 port 22: Connection refused lost connection

1. 对方机器的root是否设置了密码

https://blog.csdn.net/u013288190/article/details/109014136

 

2. 对方ssh是否设置了允许root登录

vim /etc/ssh/sshd_config

将PermitRootLogin no / without-password 改为 PermitRootLogin yes,然后重启sshd服务。

scp ssh: connect to host 192.168.6.129 port 22: Connection refused lost connection

 

最终就成功了

 

scp ssh: connect to host 192.168.6.129 port 22: Connection refused lost connection

 

 

 

参考:

https://blog.csdn.net/qq_20867981/article/details/80203836

https://www.cnblogs.com/xuliangxing/p/7428737.html

上一篇:球碰撞模拟物理效果


下一篇:中考假做题记录