SSH through HTTP proxy with corkscrew
up vote
0
down vote
favorite
I'm running into an issue connecting from a Cygwin terminal to my home Raspberry Pi with SSH from behind an HTTP proxy. It used-to-work™ and I don't know what changed since a few days ago (maybe the proxy filtering?).
I can still connect from outside the proxy-ed network without corkscrew.
Client-wise, my ssh-config is as follows:
Host *
ServerAliveInterval 60
ProxyCommand /bin/corkscrew http.proxy.here 80 %h %p
And the connection attempt gives this:
blx@proxyed-pc:~$ ssh blx@my.home.ip -v
OpenSSH_7.9p1, OpenSSL 1.0.2p 14 Aug 2018
debug1: Reading configuration data /home/blx/.ssh/config
debug1: /home/blx/.ssh/config line 1: Applying options for *
debug1: Executing proxy command: exec /bin/corkscrew http.proxy.here 80 my.home.ip 22
debug1: identity file /home/blx/.ssh/id_rsa type -1
debug1: identity file /home/blx/.ssh/id_rsa-cert type -1
debug1: identity file /home/blx/.ssh/id_dsa type -1
debug1: identity file /home/blx/.ssh/id_dsa-cert type -1
debug1: identity file /home/blx/.ssh/id_ecdsa type 2
debug1: identity file /home/blx/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/blx/.ssh/id_ed25519 type -1
debug1: identity file /home/blx/.ssh/id_ed25519-cert type -1
debug1: identity file /home/blx/.ssh/id_xmss type -1
debug1: identity file /home/blx/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.9
ssh_exchange_identification: Connection closed by remote host
Server-wise, /var/log/auth reports this:
Nov 26 13: 39:36 raspi sshd[19130]: debug1: Forked child 19699.
Nov 26 13: 39:36 raspi sshd[19699]: debug1: Set /proc/self/oom_score_adj to 0
Nov 26 13: 39:36 raspi sshd[19699]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8
Nov 26 13: 39:36 raspi sshd[19699]: debug1: inetd sockets after dupping: 3, 3
Nov 26 13: 39:36 raspi sshd[19699]: debug1: getpeername failed: Transport endpoint is not connected
Nov 26 13: 39:36 raspi sshd[19699]: debug1: ssh_remote_port failed
So the TCP connection seems broken, but I don't seem to have this issue when I try to connect with corkscrew directly (i.e. $corkscrew http.proxy.here 80 my.home.ip 22
):
Nov 26 13: 39:32 raspi sshd[19130]: debug1: Forked child 19698.
Nov 26 13: 39:32 raspi sshd[19698]: debug1: Set /proc/self/oom_score_adj to 0
Nov 26 13: 39:32 raspi sshd[19698]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8
Nov 26 13: 39:32 raspi sshd[19698]: debug1: inetd sockets after dupping: 3, 3
Nov 26 13: 39:32 raspi sshd[19698]: Connection from http.proxy.here port 28220 on 192.168.0.11 port 22
Nov 26 13: 39:32 raspi sshd[19698]: Did not receive identification string from http.proxy.here port 28220
But then of course sshd doesn't know what to do of this...
Any tip? Since I don't think I changed anything in my setup I suspect a sneaky update of the proxy filtering policy that puts me in this situation, but I have no way to be sure. I will try and update my router and Pi to use port 443 when I get home.
ssh http-proxy
add a comment |
up vote
0
down vote
favorite
I'm running into an issue connecting from a Cygwin terminal to my home Raspberry Pi with SSH from behind an HTTP proxy. It used-to-work™ and I don't know what changed since a few days ago (maybe the proxy filtering?).
I can still connect from outside the proxy-ed network without corkscrew.
Client-wise, my ssh-config is as follows:
Host *
ServerAliveInterval 60
ProxyCommand /bin/corkscrew http.proxy.here 80 %h %p
And the connection attempt gives this:
blx@proxyed-pc:~$ ssh blx@my.home.ip -v
OpenSSH_7.9p1, OpenSSL 1.0.2p 14 Aug 2018
debug1: Reading configuration data /home/blx/.ssh/config
debug1: /home/blx/.ssh/config line 1: Applying options for *
debug1: Executing proxy command: exec /bin/corkscrew http.proxy.here 80 my.home.ip 22
debug1: identity file /home/blx/.ssh/id_rsa type -1
debug1: identity file /home/blx/.ssh/id_rsa-cert type -1
debug1: identity file /home/blx/.ssh/id_dsa type -1
debug1: identity file /home/blx/.ssh/id_dsa-cert type -1
debug1: identity file /home/blx/.ssh/id_ecdsa type 2
debug1: identity file /home/blx/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/blx/.ssh/id_ed25519 type -1
debug1: identity file /home/blx/.ssh/id_ed25519-cert type -1
debug1: identity file /home/blx/.ssh/id_xmss type -1
debug1: identity file /home/blx/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.9
ssh_exchange_identification: Connection closed by remote host
Server-wise, /var/log/auth reports this:
Nov 26 13: 39:36 raspi sshd[19130]: debug1: Forked child 19699.
Nov 26 13: 39:36 raspi sshd[19699]: debug1: Set /proc/self/oom_score_adj to 0
Nov 26 13: 39:36 raspi sshd[19699]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8
Nov 26 13: 39:36 raspi sshd[19699]: debug1: inetd sockets after dupping: 3, 3
Nov 26 13: 39:36 raspi sshd[19699]: debug1: getpeername failed: Transport endpoint is not connected
Nov 26 13: 39:36 raspi sshd[19699]: debug1: ssh_remote_port failed
So the TCP connection seems broken, but I don't seem to have this issue when I try to connect with corkscrew directly (i.e. $corkscrew http.proxy.here 80 my.home.ip 22
):
Nov 26 13: 39:32 raspi sshd[19130]: debug1: Forked child 19698.
Nov 26 13: 39:32 raspi sshd[19698]: debug1: Set /proc/self/oom_score_adj to 0
Nov 26 13: 39:32 raspi sshd[19698]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8
Nov 26 13: 39:32 raspi sshd[19698]: debug1: inetd sockets after dupping: 3, 3
Nov 26 13: 39:32 raspi sshd[19698]: Connection from http.proxy.here port 28220 on 192.168.0.11 port 22
Nov 26 13: 39:32 raspi sshd[19698]: Did not receive identification string from http.proxy.here port 28220
But then of course sshd doesn't know what to do of this...
Any tip? Since I don't think I changed anything in my setup I suspect a sneaky update of the proxy filtering policy that puts me in this situation, but I have no way to be sure. I will try and update my router and Pi to use port 443 when I get home.
ssh http-proxy
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm running into an issue connecting from a Cygwin terminal to my home Raspberry Pi with SSH from behind an HTTP proxy. It used-to-work™ and I don't know what changed since a few days ago (maybe the proxy filtering?).
I can still connect from outside the proxy-ed network without corkscrew.
Client-wise, my ssh-config is as follows:
Host *
ServerAliveInterval 60
ProxyCommand /bin/corkscrew http.proxy.here 80 %h %p
And the connection attempt gives this:
blx@proxyed-pc:~$ ssh blx@my.home.ip -v
OpenSSH_7.9p1, OpenSSL 1.0.2p 14 Aug 2018
debug1: Reading configuration data /home/blx/.ssh/config
debug1: /home/blx/.ssh/config line 1: Applying options for *
debug1: Executing proxy command: exec /bin/corkscrew http.proxy.here 80 my.home.ip 22
debug1: identity file /home/blx/.ssh/id_rsa type -1
debug1: identity file /home/blx/.ssh/id_rsa-cert type -1
debug1: identity file /home/blx/.ssh/id_dsa type -1
debug1: identity file /home/blx/.ssh/id_dsa-cert type -1
debug1: identity file /home/blx/.ssh/id_ecdsa type 2
debug1: identity file /home/blx/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/blx/.ssh/id_ed25519 type -1
debug1: identity file /home/blx/.ssh/id_ed25519-cert type -1
debug1: identity file /home/blx/.ssh/id_xmss type -1
debug1: identity file /home/blx/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.9
ssh_exchange_identification: Connection closed by remote host
Server-wise, /var/log/auth reports this:
Nov 26 13: 39:36 raspi sshd[19130]: debug1: Forked child 19699.
Nov 26 13: 39:36 raspi sshd[19699]: debug1: Set /proc/self/oom_score_adj to 0
Nov 26 13: 39:36 raspi sshd[19699]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8
Nov 26 13: 39:36 raspi sshd[19699]: debug1: inetd sockets after dupping: 3, 3
Nov 26 13: 39:36 raspi sshd[19699]: debug1: getpeername failed: Transport endpoint is not connected
Nov 26 13: 39:36 raspi sshd[19699]: debug1: ssh_remote_port failed
So the TCP connection seems broken, but I don't seem to have this issue when I try to connect with corkscrew directly (i.e. $corkscrew http.proxy.here 80 my.home.ip 22
):
Nov 26 13: 39:32 raspi sshd[19130]: debug1: Forked child 19698.
Nov 26 13: 39:32 raspi sshd[19698]: debug1: Set /proc/self/oom_score_adj to 0
Nov 26 13: 39:32 raspi sshd[19698]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8
Nov 26 13: 39:32 raspi sshd[19698]: debug1: inetd sockets after dupping: 3, 3
Nov 26 13: 39:32 raspi sshd[19698]: Connection from http.proxy.here port 28220 on 192.168.0.11 port 22
Nov 26 13: 39:32 raspi sshd[19698]: Did not receive identification string from http.proxy.here port 28220
But then of course sshd doesn't know what to do of this...
Any tip? Since I don't think I changed anything in my setup I suspect a sneaky update of the proxy filtering policy that puts me in this situation, but I have no way to be sure. I will try and update my router and Pi to use port 443 when I get home.
ssh http-proxy
I'm running into an issue connecting from a Cygwin terminal to my home Raspberry Pi with SSH from behind an HTTP proxy. It used-to-work™ and I don't know what changed since a few days ago (maybe the proxy filtering?).
I can still connect from outside the proxy-ed network without corkscrew.
Client-wise, my ssh-config is as follows:
Host *
ServerAliveInterval 60
ProxyCommand /bin/corkscrew http.proxy.here 80 %h %p
And the connection attempt gives this:
blx@proxyed-pc:~$ ssh blx@my.home.ip -v
OpenSSH_7.9p1, OpenSSL 1.0.2p 14 Aug 2018
debug1: Reading configuration data /home/blx/.ssh/config
debug1: /home/blx/.ssh/config line 1: Applying options for *
debug1: Executing proxy command: exec /bin/corkscrew http.proxy.here 80 my.home.ip 22
debug1: identity file /home/blx/.ssh/id_rsa type -1
debug1: identity file /home/blx/.ssh/id_rsa-cert type -1
debug1: identity file /home/blx/.ssh/id_dsa type -1
debug1: identity file /home/blx/.ssh/id_dsa-cert type -1
debug1: identity file /home/blx/.ssh/id_ecdsa type 2
debug1: identity file /home/blx/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/blx/.ssh/id_ed25519 type -1
debug1: identity file /home/blx/.ssh/id_ed25519-cert type -1
debug1: identity file /home/blx/.ssh/id_xmss type -1
debug1: identity file /home/blx/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.9
ssh_exchange_identification: Connection closed by remote host
Server-wise, /var/log/auth reports this:
Nov 26 13: 39:36 raspi sshd[19130]: debug1: Forked child 19699.
Nov 26 13: 39:36 raspi sshd[19699]: debug1: Set /proc/self/oom_score_adj to 0
Nov 26 13: 39:36 raspi sshd[19699]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8
Nov 26 13: 39:36 raspi sshd[19699]: debug1: inetd sockets after dupping: 3, 3
Nov 26 13: 39:36 raspi sshd[19699]: debug1: getpeername failed: Transport endpoint is not connected
Nov 26 13: 39:36 raspi sshd[19699]: debug1: ssh_remote_port failed
So the TCP connection seems broken, but I don't seem to have this issue when I try to connect with corkscrew directly (i.e. $corkscrew http.proxy.here 80 my.home.ip 22
):
Nov 26 13: 39:32 raspi sshd[19130]: debug1: Forked child 19698.
Nov 26 13: 39:32 raspi sshd[19698]: debug1: Set /proc/self/oom_score_adj to 0
Nov 26 13: 39:32 raspi sshd[19698]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8
Nov 26 13: 39:32 raspi sshd[19698]: debug1: inetd sockets after dupping: 3, 3
Nov 26 13: 39:32 raspi sshd[19698]: Connection from http.proxy.here port 28220 on 192.168.0.11 port 22
Nov 26 13: 39:32 raspi sshd[19698]: Did not receive identification string from http.proxy.here port 28220
But then of course sshd doesn't know what to do of this...
Any tip? Since I don't think I changed anything in my setup I suspect a sneaky update of the proxy filtering policy that puts me in this situation, but I have no way to be sure. I will try and update my router and Pi to use port 443 when I get home.
ssh http-proxy
ssh http-proxy
edited yesterday
Rui F Ribeiro
38.4k1477127
38.4k1477127
asked Nov 26 at 12:59
blx
6
6
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
we need to agree that there is no intent of bypassing some security measures and that connecting this way is in no breach of any contract / agreement, of course. Pseudo-legal disclaimer done, if I were you I'd indeed try to switch my server to listen for SSH connections on port 443 better than any other, if going through a web proxy.
Simple reasons:
- While communications on port 80 (normal web traffic) are unencrypted and mostly plain text (when reading a page), port 443 is for SSL cyphered communications. A proxy won't be surprised to see communications in binary form through that port. You need a binary connection for SSH, not like a web page.
- You're not exposing your server to the public (if you don't have a ip white list firewall on the other side) with a commonly known port like 22. A new server online lasts unprobed sometimes even less than 5 minutes. Then somebody from somewhere is going to try to login via SSH, if they see the port 22 open. Port 443 doesn't add much more security but at least it's a little less obvious than 22.
Good luck!
No breach of contract intended, no worries! After further attempts I came to the conclusion that the proxy has a new Deep Packet Inspection feature. I tried to establish an SSL tunnel on port 443 using stunnel on the server and proxytunnel on the client, but even then I clearly see the connection being dropped as soon as SSH data goes through. The proxy acts as a MitM thanks to its self-signed certificate installed on the client. I prefer to give up at this point, but thanks for you input!
– blx
10 hours ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
we need to agree that there is no intent of bypassing some security measures and that connecting this way is in no breach of any contract / agreement, of course. Pseudo-legal disclaimer done, if I were you I'd indeed try to switch my server to listen for SSH connections on port 443 better than any other, if going through a web proxy.
Simple reasons:
- While communications on port 80 (normal web traffic) are unencrypted and mostly plain text (when reading a page), port 443 is for SSL cyphered communications. A proxy won't be surprised to see communications in binary form through that port. You need a binary connection for SSH, not like a web page.
- You're not exposing your server to the public (if you don't have a ip white list firewall on the other side) with a commonly known port like 22. A new server online lasts unprobed sometimes even less than 5 minutes. Then somebody from somewhere is going to try to login via SSH, if they see the port 22 open. Port 443 doesn't add much more security but at least it's a little less obvious than 22.
Good luck!
No breach of contract intended, no worries! After further attempts I came to the conclusion that the proxy has a new Deep Packet Inspection feature. I tried to establish an SSL tunnel on port 443 using stunnel on the server and proxytunnel on the client, but even then I clearly see the connection being dropped as soon as SSH data goes through. The proxy acts as a MitM thanks to its self-signed certificate installed on the client. I prefer to give up at this point, but thanks for you input!
– blx
10 hours ago
add a comment |
up vote
0
down vote
we need to agree that there is no intent of bypassing some security measures and that connecting this way is in no breach of any contract / agreement, of course. Pseudo-legal disclaimer done, if I were you I'd indeed try to switch my server to listen for SSH connections on port 443 better than any other, if going through a web proxy.
Simple reasons:
- While communications on port 80 (normal web traffic) are unencrypted and mostly plain text (when reading a page), port 443 is for SSL cyphered communications. A proxy won't be surprised to see communications in binary form through that port. You need a binary connection for SSH, not like a web page.
- You're not exposing your server to the public (if you don't have a ip white list firewall on the other side) with a commonly known port like 22. A new server online lasts unprobed sometimes even less than 5 minutes. Then somebody from somewhere is going to try to login via SSH, if they see the port 22 open. Port 443 doesn't add much more security but at least it's a little less obvious than 22.
Good luck!
No breach of contract intended, no worries! After further attempts I came to the conclusion that the proxy has a new Deep Packet Inspection feature. I tried to establish an SSL tunnel on port 443 using stunnel on the server and proxytunnel on the client, but even then I clearly see the connection being dropped as soon as SSH data goes through. The proxy acts as a MitM thanks to its self-signed certificate installed on the client. I prefer to give up at this point, but thanks for you input!
– blx
10 hours ago
add a comment |
up vote
0
down vote
up vote
0
down vote
we need to agree that there is no intent of bypassing some security measures and that connecting this way is in no breach of any contract / agreement, of course. Pseudo-legal disclaimer done, if I were you I'd indeed try to switch my server to listen for SSH connections on port 443 better than any other, if going through a web proxy.
Simple reasons:
- While communications on port 80 (normal web traffic) are unencrypted and mostly plain text (when reading a page), port 443 is for SSL cyphered communications. A proxy won't be surprised to see communications in binary form through that port. You need a binary connection for SSH, not like a web page.
- You're not exposing your server to the public (if you don't have a ip white list firewall on the other side) with a commonly known port like 22. A new server online lasts unprobed sometimes even less than 5 minutes. Then somebody from somewhere is going to try to login via SSH, if they see the port 22 open. Port 443 doesn't add much more security but at least it's a little less obvious than 22.
Good luck!
we need to agree that there is no intent of bypassing some security measures and that connecting this way is in no breach of any contract / agreement, of course. Pseudo-legal disclaimer done, if I were you I'd indeed try to switch my server to listen for SSH connections on port 443 better than any other, if going through a web proxy.
Simple reasons:
- While communications on port 80 (normal web traffic) are unencrypted and mostly plain text (when reading a page), port 443 is for SSL cyphered communications. A proxy won't be surprised to see communications in binary form through that port. You need a binary connection for SSH, not like a web page.
- You're not exposing your server to the public (if you don't have a ip white list firewall on the other side) with a commonly known port like 22. A new server online lasts unprobed sometimes even less than 5 minutes. Then somebody from somewhere is going to try to login via SSH, if they see the port 22 open. Port 443 doesn't add much more security but at least it's a little less obvious than 22.
Good luck!
answered Nov 27 at 20:52
Kappa
11
11
No breach of contract intended, no worries! After further attempts I came to the conclusion that the proxy has a new Deep Packet Inspection feature. I tried to establish an SSL tunnel on port 443 using stunnel on the server and proxytunnel on the client, but even then I clearly see the connection being dropped as soon as SSH data goes through. The proxy acts as a MitM thanks to its self-signed certificate installed on the client. I prefer to give up at this point, but thanks for you input!
– blx
10 hours ago
add a comment |
No breach of contract intended, no worries! After further attempts I came to the conclusion that the proxy has a new Deep Packet Inspection feature. I tried to establish an SSL tunnel on port 443 using stunnel on the server and proxytunnel on the client, but even then I clearly see the connection being dropped as soon as SSH data goes through. The proxy acts as a MitM thanks to its self-signed certificate installed on the client. I prefer to give up at this point, but thanks for you input!
– blx
10 hours ago
No breach of contract intended, no worries! After further attempts I came to the conclusion that the proxy has a new Deep Packet Inspection feature. I tried to establish an SSL tunnel on port 443 using stunnel on the server and proxytunnel on the client, but even then I clearly see the connection being dropped as soon as SSH data goes through. The proxy acts as a MitM thanks to its self-signed certificate installed on the client. I prefer to give up at this point, but thanks for you input!
– blx
10 hours ago
No breach of contract intended, no worries! After further attempts I came to the conclusion that the proxy has a new Deep Packet Inspection feature. I tried to establish an SSL tunnel on port 443 using stunnel on the server and proxytunnel on the client, but even then I clearly see the connection being dropped as soon as SSH data goes through. The proxy acts as a MitM thanks to its self-signed certificate installed on the client. I prefer to give up at this point, but thanks for you input!
– blx
10 hours ago
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f484202%2fssh-through-http-proxy-with-corkscrew%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown