Results 1 to 5 of 5

Thread: Port changing ssh tunnel

  1. #1
    Join Date
    Apr 2007
    Beans
    73

    Port changing ssh tunnel

    Hey I was happy connecting to a host via ssh however due to Router changes the prots have become unusable. How do I connect out on another port

    I was always using ssh -ND 23 lol@somehost.org

    But now it won't connect how do I get it through other ports?

  2. #2
    Join Date
    Apr 2008
    Location
    Phoenix, AZ
    Beans
    1,393
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Port changing ssh tunnel

    Specify the remote port with the -p option.


    ssh --help

  3. #3
    Join Date
    Apr 2007
    Beans
    73

    Re: Port changing ssh tunnel

    So

    ssh -ND 23 -P 80 lol@somewhere.org
    ?

  4. #4
    Join Date
    Feb 2006
    Location
    Moshi, Tanzania
    Beans
    805
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Port changing ssh tunnel

    Your remote ssh server has to be listening on that port for it to work.

    You need to add a "port #" line to your distant sshd_config file (where # is the port number you wish to use).

    In your case, you'll need to add "Port 80", then restart the ssh service.

    After than, "ssh -ND localhost:23 -p 80 lol@somewhere.org" should work.
    Mind that localhost:23 binds the socks proxy to your localhost on port 23, and only allows access from localhost. Then socks forwards whatever you send it to your distant server using port 80.

    Hope this helps

    - Trib'

    PS: We are not discussing circumventing a firewall here I guess, since I'm pretty sure you know it is against the forum's code of conduct... Don't you?
    Last edited by tribaal; May 13th, 2008 at 01:10 PM. Reason: typo

  5. #5
    Join Date
    Apr 2007
    Beans
    73

    Re: Port changing ssh tunnel

    Yeah 100% we're talking about the host changing here

Bookmarks

Posting Permissions

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