Find the answer to your Linux question:
Results 1 to 6 of 6
I want to SSH to my server on the internet, but my proxy I'm behind only accepts secure connections from port 443. How do I trick my proxy that I'm ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Location
    South West England
    Posts
    91

    SSH Tunneling?


    I want to SSH to my server on the internet, but my proxy I'm behind only accepts secure connections from port 443. How do I trick my proxy that I'm actually sending on port 443 when I want to get to my server on port 22? If this is not possible, how do I set up my server to accept connections from port 443 as well as 22?

    I'm thinking like a -L or a -R option in SSH? (I'm using PuTTY, but the concept is the same)

  2. #2
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,126
    You can simply switch your ssh port to 443 in /etc/ssh/sshd_config and then restart sshd. If you want to run on both ports, I haven't done it myself but a quick goodle revealed this :-

    Tutorial: SSH To Alternate Ports and Enabling Multiple SSH Daemons | MacResearch

    I hope that helps.

  3. #3
    Just Joined!
    Join Date
    Aug 2005
    Location
    South West England
    Posts
    91
    Thanks, I hoped there was a way to redirect the ports so I didn't have to do this.

  4. #4
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,126
    Have you looked at port forwarding on your router? You might be able to direct several ports into port 22. To be honest I'm sure it can be done but I haven't done it myself.

  5. #5
    Just Joined!
    Join Date
    Aug 2008
    Location
    Seattle, WA
    Posts
    46
    Quote Originally Posted by bigtomrodney View Post
    Have you looked at port forwarding on your router? You might be able to direct several ports into port 22. To be honest I'm sure it can be done but I haven't done it myself.
    I know for a fact Apple hardware can do it and I imagine dd-wrt can, but I'd bet its fairly uncommon because everyone I've spoke to scratched their heads when I told them I forwarded port xxxx to .10:22

    if you're using a *NIX host AS a router, I'm sure it can route that way too.

  6. #6
    Just Joined!
    Join Date
    Aug 2005
    Location
    South West England
    Posts
    91
    I sorted it out and made it listen to 443... I had no router on the remote host...

    My question now is, now that I've done ssh (remote_host) -R :80:localhost:80
    My local apache2 logs show up as localhost regardless of who connected to (remote_host), how do I make them show up as the originating host?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •