The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Outgoing SSH Port

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

  1. Ebart

    Ebart Member

    Joined:
    May 1, 2003
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    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

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    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.
     
Loading...

Share This Page