SFTP 连接突然不起作用

SFTP 连接突然不起作用

我们有一个 sftp 连接突然停止工作,并抛出“远程主机关闭连接”。它挂起很长时间发送数据包类型 50之后成功身份验证(无)然后立即中止远程主机关闭连接

我在这里搜索了一些有同样错误的问题,但它们前面都有 ssh_exchange 标签,而我们没有

如果有帮助的话,我已经附加了详细日志。

C:\Users\rpaadm>sftp -vvv -i "C:\Users\rpaadm\Box Sync\RPA-PROD-Key\Private_Key\SFTP\id_rsa" <userid>@<hostname>
OpenSSH_7.2p2, OpenSSL 1.0.2h  3 May 2016
debug1: Reading configuration data /etc/ssh_config
debug2: resolving "<hostname>" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to <hostname> [<ip>] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\rpaadm\\Box Sync\\RPA-PROD-Key\\Private_Key\\SFTP\\id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\rpaadm\\Box Sync\\RPA-PROD-Key\\Private_Key\\SFTP\\id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.4
debug1: match: OpenSSH_6.4 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to <hostname>:22 as '<userid>'
debug3: hostkeys_foreach: reading file "/home/rpaadm/.ssh/known_hosts"
debug3: record_hostkey: found key type RSA in file /home/rpaadm/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys from <hostname>
debug3: order_hostkeyalgs: prefer hostkeyalgs: [email protected],rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: [email protected],rsa-sha2-512,rsa-sha2-256,ssh-rsa,[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],aes128-cbc,aes192-cbc,aes256-cbc,3des-cbc
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],aes128-cbc,aes192-cbc,aes256-cbc,3des-cbc
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected],zlib
debug2: compression stoc: none,[email protected],zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: host key algorithms: ssh-rsa
debug2: ciphers ctos: aes128-ctr,aes192-ctr,aes256-ctr
debug2: ciphers stoc: aes128-ctr,aes192-ctr,aes256-ctr
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-md5,hmac-sha1,[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-md5,hmac-sha1,[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: ecdh-sha2-nistp256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: [email protected] compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: [email protected] compression: none
debug3: send packet: type 30
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: Server host key: ssh-rsa SHA256:mhyTB66oPwGzJyNcd9ZdKbG4H5NV9aaZwv61J6ecsYA
debug3: hostkeys_foreach: reading file "/home/rpaadm/.ssh/known_hosts"
debug3: record_hostkey: found key type RSA in file /home/rpaadm/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys from <hostname>
debug3: hostkeys_foreach: reading file "/home/rpaadm/.ssh/known_hosts"
debug3: record_hostkey: found key type RSA in file /home/rpaadm/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys from <ip>
debug1: Host '<hostname>' is known and matches the RSA host key.
debug1: Found key in /home/rpaadm/.ssh/known_hosts:1
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug2: set_newkeys: mode 0
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS received
debug2: key: C:\\Users\\rpaadm\\Box Sync\\RPA-PROD-Key\\Private_Key\\SFTP\\id_rsa (0x0), explicit
debug3: send packet: type 5
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug1: Authentication succeeded (none).
Authenticated to <hostname> ([<ip>]:22).
debug2: fd 4 setting O_NONBLOCK
debug2: fd 5 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting [email protected]
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: send packet: type 1
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
  #0 client-session (t3 r-1 i0/0 o0/0 fd 4/5 cc -1)

debug3: fd 0 is not O_NONBLOCK
debug3: fd 1 is not O_NONBLOCK
Connection to <hostname> closed by remote host.
Transferred: sent 1660, received 1836 bytes, in 0.0 seconds
Bytes per second: sent 36274.7, received 40120.6
debug1: Exit status -1
Connection closed

我认为主要问题是它没有返回横幅和其他身份验证方法,而是成功了。没有密钥/使用不正确的密钥登录会返回相同的错误。我们甚至没有收到密码提示。

我正在尝试请求 sshd 日志,但我的 sftp 服务器团队联系人中似乎没有人知道如何找到它。我可能需要一段时间才能从他们那里得到任何东西。

远程服务器是 z/OS

编辑:最终能够从服务器端获取一些信息。实际错误是FOTS1450 身份验证前超时但服务器管理员无法确定原因。快速谷歌错误代码显示这可能与登录宽限时间参数让我感到困惑,因为我们之前能够登录

相关内容