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是否设置了密码

 

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

 

 

 

上一篇:绿色数据中心点亮天坛医院大智慧


下一篇:webflux