尽管 SSH 可以工作,但 SCP 却无法工作

尽管 SSH 可以工作,但 SCP 却无法工作

我有一个远程 VPS,可以使用我的 SSH 密钥通过 SSH 成功连接到它。我在 /etc/ssh/sshd_config 中禁用了密码验证。

尽管查看了其他几个类似主题的帖子,我还是无法让 scp 工作。下面就是我所做的以及结果(巧合的是,本地和远程的用户名相同):

scp -vvv -i /home/xixor/.ssh/id_rsa /home/xixor/testfile1 [email protected]:/home/xixor/temp

结果:

Executing: program /usr/bin/ssh host xxx.xxx.xx.xxx, user xixor, command scp -v -t /home/xixor/temp
OpenSSH_8.4p1, OpenSSL 1.1.1i  8 Dec 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: resolve_canonicalize: hostname xxx.xxx.xx.xxx is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/xixor/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/xixor/.ssh/known_hosts2'
debug2: ssh_connect_direct
debug1: Connecting to xxx.xxx.xx.xxx [xxx.xxx.xx.xxx] port 22.
debug1: connect to address xxx.xxx.xx.xxx port 22: Connection timed out
ssh: connect to host xxx.xxx.xx.xxx port 22: Connection timed out
lost connection

scp 安装在远程服务器上,仅用于将内容复制到该服务器上的位置或从该位置复制内容。我可以在服务器上的某个地方找到调试日志,该日志可以提供关于正在发生的事情的更多信息吗?(即,当使用 -vvv 标志执行命令时,从我的本地计算机输出的信息超出上述输出的信息)

相关内容