【发布时间】:2021-01-16 03:31:55
【问题描述】:
我在使用 scp 命令复制远程服务器中的某些文件时遇到了一些麻烦。
我在终端上写的那一行是
scp file.dat server@address.it:home/folder
大约一分钟后,它说连接由于超时而丢失
使用选项-vvv 我明白了
Executing: program /usr/bin/ssh host server@address.it, user username, command scp -v -t home/folder
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "server@address.it" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to server@address.it [141.108.1.185] port 22.
debug1: connect to address 141.108.1.185 port 22: Connection timed out
ssh: connect to host server@address.it port 22: Connection timed out
lost connection
在网上搜索,我发现这个问题最常见的来源是防火墙,但我检查了它们,似乎它们没问题。确实有
sudo ufw status
Stato: attivo
A Azione Da
- ------ --
22/tcp ALLOW Anywhere
22 ALLOW Anywhere
22/tcp (v6) ALLOW Anywhere (v6)
22 (v6) ALLOW Anywhere (v6)
最后一条信息,如果我尝试使用 ssh 从我的 PC 终端访问远程服务器,没有问题,并且我已经完成了创建文件夹等简单操作(现在不多了,因为我有将一些数据从我的 PC 复制到该服务器以进行处理)
【问题讨论】:
标签: shell ssh remote-access remote-server scp