当前位置: 代码迷 >> 综合 >> scp 远程传输文件 ssh: connect to host xxx.xxx.xx.xx port 22: Connection refused lost connection
  详细解决方案

scp 远程传输文件 ssh: connect to host xxx.xxx.xx.xx port 22: Connection refused lost connection

热度:95   发布时间:2023-12-18 05:56:16.0

1.由于我的ssh端口有修改过。默认是22端口。

2,解决方法。

scp -Pxxx(你修改过的端口)    xxx.txt(需要传输的文件)     root@xx.xx.xxx.xx(用户以及ip)

 

注意!!!注意!!!注意!!!

-P参数的位置不可以改变,必须在第2位。

  相关解决方案