即使 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 標誌執行命令時,本機電腦的輸出超出了上述輸出)

相關內容