终端输入: AlandeiMac:USBSSH Alanpython tcprelay.py 22:2222 Forwarding local port 2222 to remote port 22 Incoming connection to 2222 Waiting for devices... Connecting to device <MuxDevice: ID 1 ProdID 0x12a8 Serial '57fe8578a65bc8faee5babd864b0bd3c2505aead' Location 0x14200000> Connection established, relaying data Connection closed
新建终端输入报错: AlandeiMac:~ Alan$ ssh root@localhost -p 2222 ssh_exchange_identification: Connection closed by remote host AlandeiMac:~ Alan$
还是不行。 AlandeiMac:~ Alan$ rm ~/.ssh/known_hosts AlandeiMac:~ Alan$ cd ~/.ssh/ AlandeiMac:.ssh Alan$ ls github_rsa github_rsa.pub known_hosts.old AlandeiMac:.ssh Alan$ AlandeiMac:.ssh Alan$ cd /Users/Alan/Downloads/USBSSH AlandeiMac:USBSSH Alan$ python tcprelay.py 22:2222 Forwarding local port 2222 to remote port 22 Incoming connection to 2222 Waiting for devices... Connecting to device <MuxDevice: ID 22 ProdID 0x12a8 Serial '57fe8578a65bc8faee5babd864b0bd3c2505aead' Location 0x14200000> Connection established, relaying data Connection closed
AlandeiMac:local Alan$ iproxy 2222 22
waiting for connection
accepted connection, fd = 4
waiting for connection
Number of available devices == 5
Requesting connecion to device handle == 294 (serial: 77da62280e5b621298b8285f7d35ad1ff0d6675d), port 22
Error connecting to device!
AlandeiMac:local Alan$ iproxy 2222 22
waiting for connection
accepted connection, fd = 4
waiting for connection
Number of available devices == 3
Requesting connecion to device handle == 17 (serial: c5193125a559538b639e13a008fa422f8e59627e), port 22
Error connecting to device!
AlandeiMac:.ssh Alan$ ssh -vvv root@127.0.0.1 -p 2222
OpenSSH_7.4p1, LibreSSL 2.5.0
debug2: resolving "127.0.0.1" port 2222
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 127.0.0.1 [127.0.0.1] port 2222.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Alan/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Alan/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Alan/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Alan/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Alan/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Alan/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Alan/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/Alan/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
ssh_exchange_identification: Connection closed by remote host