sftp 收到断开连接 11:应用程序错误

sftp 收到断开连接 11:应用程序错误

我正在尝试通过 sftp 从客户端 Linux 连接到服务器。当我尝试使用 bash 连接时,sftp -v -oPort=22 username@SERVER我得到:

Received disconnect from IP_OF_THE_SERVER: 11: Application error
Couldn't read packet: Connection reset by peer
Running in verbose mode I get the following:
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: Connecting to SERVER.IP [SERVER.IP] port 22.
debug1: Connection established.
debug1: identity file /opt/PIREFTP/pireftp/.ssh/id_rsa type 1
debug1: identity file /opt/PIREFTP/pireftp/.ssh/id_rsa-cert type -1
debug1: identity file /opt/PIREFTP/pireftp/.ssh/id_dsa type 2
debug1: identity file /opt/PIREFTP/pireftp/.ssh/id_dsa-cert type -1
debug1: identity file /opt/PIREFTP/pireftp/.ssh/id_ecdsa type -1
debug1: identity file /opt/PIREFTP/pireftp/.ssh/id_ecdsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version mod_sftp/0.9.8
debug1: no match: mod_sftp/0.9.8
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
Received disconnect from 194.8.251.205: 11: Application error
Couldn't read packet: Connection reset by peer

我不明白为什么它会尝试通过按键连接,我希望被提示输入密码。我甚至尝试运行-o PubkeyAuthentication=否参数,但仍然失败。如果我使用 FTPManager 客户端从 iPhone 进行连接,则可以成功连接。

答案1

好像sftp -F /dev/null -o PreferredAuthentications=password user@host正在提示我输入密码。

相关内容