密钥交换后,主机自动关闭SSH连接

时间:2020-11-12 15:23:32

标签: ssh remote-access nvidia-jetson-nano

我正在尝试通过SSH通过Mac上的动态DNS远程连接到Jetson Nano。路由器端的所有配置均应保留,同时设置了动态DNS和端口转发。

当我与Jetson在同一网络上时,SSH连接有效,但是当我尝试在本地网络之外进行连接时,主机会自动关闭连接。

使用ssh -vvv {HOST}@{MyDNSURL.com}得到以下输出:

OpenSSH_8.1p1, LibreSSL 2.7.3
debug1: Reading configuration data /Users/USR/.ssh/config
debug1: /Users/USR/.ssh/config line 1: Applying options for *
debug1: /Users/USR/.ssh/config line 5: Applying options for MYURL.tplinkdns.com
debug3: kex names ok: [diffie-hellman-group1-sha1]
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 47: Applying options for *
debug3: kex names ok: [diffie-hellman-group1-sha1]
debug1: Connecting to MYURL.tplinkdns.com port 22.
debug1: Connection established.
debug1: identity file /Users/USR/.ssh/id_rsa type 0
debug1: identity file /Users/URS/.ssh/id_rsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.1
debug1: Remote protocol version 2.0, remote software version YDKzg
debug1: no match: YDKzg
debug3: fd 5 is O_NONBLOCK
debug1: Authenticating to MYURL.tplinkdns.com:22 as 'REMOTE-USER'
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: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,ext-info-c
debug2: host key algorithms: ssh-dss,ssh-rsa
debug2: ciphers ctos: aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
debug2: ciphers stoc: aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
debug2: MACs ctos: hmac-md5,hmac-sha1,umac-64@openssh.com
debug2: MACs stoc: hmac-md5,hmac-sha1,umac-64@openssh.com
debug2: compression ctos: none,zlib@openssh.com,zlib
debug2: compression stoc: none,zlib@openssh.com,zlib
debug2: languages ctos: 
debug2: languages stoc: 
debug2: first_kex_follows 0 
debug2: reserved 0 
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug2: host key algorithms: ssh-rsa,ssh-dss
debug2: ciphers ctos: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: ciphers stoc: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: MACs ctos: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: MACs stoc: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: compression ctos: none,zlib
debug2: compression stoc: none,zlib
debug2: languages ctos: 
debug2: languages stoc: 
debug2: first_kex_follows 0 
debug2: reserved 0 
debug1: kex: algorithm: diffie-hellman-group1-sha1
debug1: kex: host key algorithm: ssh-dss
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-md5 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-md5 compression: none
debug2: bits set: 510/1024
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: Server host key: ssh-dss SHA256:w0OIRAfe5tisNUlpD+69ECmn4fNx1V1EFQzzUrr6OUk
debug3: hostkeys_foreach: reading file "/Users/USR/.ssh/known_hosts"
debug3: record_hostkey: found key type DSA in file /Users/USR/.ssh/known_hosts:6
debug3: load_hostkeys: loaded 1 keys from MYURL.tplinkdns.com
debug3: hostkeys_foreach: reading file "/Users/USR/.ssh/known_hosts"
debug3: record_hostkey: found key type DSA in file /Users/USR/.ssh/known_hosts:6
debug3: load_hostkeys: loaded 1 keys from HOST-IP
debug1: Host 'MYURL.tplinkdns.com' is known and matches the DSA host key.
debug1: Found key in /Users/USR/.ssh/known_hosts:6
debug2: bits set: 549/1024
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey out after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey in after 4294967296 blocks
debug1: Will attempt key: /Users/USR/.ssh/id_rsa RSA SHA256:WaInPTFU4u8mWZ+cwZe1wZ6Mcu+ffQaaZO7Xf1iTKGo explicit
debug2: pubkey_prepare: done
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
Connection closed by HOST-IP port 22

据我了解,连接已建立,交换了正确的密钥(?),然后主机出于某种原因关闭了连接。

0 个答案:

没有答案
相关问题