7

I'm trying to connect to an SSH server running on port 443.

I can SSH into my devbox on Port 443:

ssh -L 8080:devbox:443 root@devbox -p 443

But I can't actually get the devbox to load in my browser. When I go to localhost:8080 I get the following error:

SSH-2.0-OpenSSH_4.3
Protocol mismatch.

When I ssh -V I get the following:

devbox: OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008

local machine: OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011

I'm assuming that this difference is what's causing the protocol mismatch. Can anyone suggest how to resolve the mismatch?

Timmmm
  • 1,637
  • 2
  • 12
  • 16
jawns317
  • 171
  • 1
  • 1
  • 4
  • You are asking the very people that administrator those firewalls how to circumnavigate them? Perhaps you should review what is [on-topic](http://serverfault.com/help/on-topic) here. If you need access to your development machine you should work with your operations people to make that happen. –  Aug 13 '14 at 17:01
  • On what port is your https web server running on your devbox, if your SSH runs on port 443? – Tero Kilkanen Aug 13 '14 at 19:39
  • Note "Protocol mismatch" usually doesn't mean that there are actually an version mismatches. It probably means you're connecting completely different protocols together. In this case there's clearly an SSH server listening on `localhost:8080` and you're trying to connect to it using HTTP which is what causes the `Protocol mismatch` error. – Timmmm Jan 14 '22 at 09:32

2 Answers2

2

Thats..... strange, You're creating an ssh tunnel to port 443 on the remote machine (devbox) but you've clearly got sshd listening on port 443 (Which is https by default), so when you point your browser at localhost:8080, you understandably get the sshd server Whats more, its pretty impossible for you to have a webserver listening on port 443, given thats what sshd is listening on.

Perhaps you meant this:

ssh -L 8080:devbox:80 root@devbox -p 443
GeoSword
  • 1,657
  • 12
  • 16
  • That works for http stuff, but not for https, which is what I need. Since I'm using 443 for sshd, does that mean it's impossible for me to access any https content? – jawns317 Aug 13 '14 at 16:46
  • Would a multiplexer like [sslh](https://github.com/yrutschle/sslh) work in this case? – jawns317 Aug 13 '14 at 16:51
  • > does that mean it's impossible for me to access any https content on port 443? Yes. Usually ssh would run on port 22 and https on port 443. However, you could run https on port 4443 (for example) – GeoSword Aug 14 '14 at 07:17
0

You are creating a tunnel to your sshd port. This gives you the error, when trying to do http to your ssh server.

Change your tunnel to point to the ip and port of your web server.

sastorsl
  • 362
  • 2
  • 15