小编Joe*_*zas的帖子

无法通过 SCP 连接,但 SSH 连接有效

我正在尝试连接到我的服务器以使用 scp 传输文件:

$ scp -v -r -P <port> <user>@<host>:~/dir/ dir/
Run Code Online (Sandbox Code Playgroud)

这是输出:

OpenSSH_5.2p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /Users/joe/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to <host> [<host>] port <port>.
debug1: Connection established.
debug1: identity file /Users/joe/.ssh/identity type -1
debug1: identity file /Users/joe/.ssh/id_rsa type -1
debug1: identity file /Users/joe/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host
Run Code Online (Sandbox Code Playgroud)

但通过 SSH 连接工作正常:

$ ssh <user>@<host> -p <port>
<user>@<host>'s password:
<user>@<host>:~$
Run Code Online (Sandbox Code Playgroud)

好的

这有什么问题?

/etc/ssh/sshd_config在主机上的文件是:

# Package …
Run Code Online (Sandbox Code Playgroud)

ssh scp

0
推荐指数
1
解决办法
2万
查看次数

标签 统计

scp ×1

ssh ×1