Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Outgoing SSH Port

Discussion in 'General Discussion' started by Ebart, Nov 24, 2006.

  1. Ebart

    Ebart Member

    May 1, 2003
    Likes Received:
    Trophy Points:
    How do I set my outgoing SSH port, I would have thought it would been port 22, just as it is by default incoming, but looking at my firewall logs, its blocking my outgoing SSH connections, which always have a source port of a random high range number.

    Google seems to be a pain in the butt searching for "outgoing ssh port" or "source ssh port" with all the tunnelling threads, otherwise I would have fixed this by now.

    I had changed my incoming SSH port to a non standard port, but reverting it to port 22 did not solve anything (no surprise there), is there some configuration I can set? Do other people have their SSH outgo with port 22 or does it use a random high range like mine? I obviously do not want to disable the firewall or allow all outgoing ports if I only need to allow one port.

    Thank you.
  2. chirpy

    chirpy Well-Known Member

    Jun 15, 2002
    Likes Received:
    Trophy Points:
    Go on, have a guess
    Doesn't work like that. Your ssh connection will be going out on port 22 unless you change it with the -p switch on the remote server, you will always have an ephemeral local port that you're connecting from. You should only need port 22 TCP outgoing open in your firewall for it to work.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice