Scenario tipico: sto provando a SSH attraverso un proxy HTTP aziendale su una macchina remota usando il cavatappi, e ottengo:
ssh_exchange_identification: Connection closed by remote host
Ovviamente, ci sono molti motivi per cui questo potrebbe accadere: il proxy potrebbe non permetterlo, la casella remota potrebbe non essere in esecuzione sshd, ecc.
Quindi, ho provato a eseguire il tunnel manualmente tramite telnet:
$ telnet proxy.evilcorporation.com 82
Trying XX.XX.XX.XX...
Connected to proxy.evilcorporation.com.
Escape character is '^]'.
CONNECT myremotehost.com:22 HTTP/1.1
HTTP/1.1 200 Connection established
Quindi, a meno che non mi sbagli ... sembra che la connessione sia lavoro .
Quindi, perché allora, non funziona tramite cavatappi?
ssh -vvv root@myremotehost.com -p 22 -o "ProxyCommand corkscrew proxy.evilcorporation.com 82 myremotehost.com 22"
OpenSSH_6.6, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Executing proxy command: exec corkscrew proxy.evilcorporation.com 82 myremotehost.com 22
debug1: permanently_set_uid: 0/0
debug1: permanently_drop_suid: 0
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6p1 Ubuntu-2ubuntu1
ssh_exchange_identification: Connection closed by remote host