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.

changing ssh port fails

Discussion in 'General Discussion' started by Lyttek, Jan 31, 2006.

  1. Lyttek

    Lyttek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    770
    Likes Received:
    3
    Trophy Points:
    18
    changed conf.apf and sshd_config to allow port 8669 or 10022 as the ssh port, restarted both services, can't connect. All works fine on port 22. After changing the above, port 22 doesn't work, so something is changing.

    Hints?

    centos 4.2, fresh install of OS and cpanel 10.xxx
     
  2. WCrooks

    WCrooks Active Member

    Joined:
    Aug 29, 2003
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Canada
    I actually just did this morning. Double check that:

    -you entered the port correctly in the list
    -you entered the ssh port in the correct configuration variable

    in an attempt to be helpful, here is a properly configured configuration line for port 8669 for conf.apf.

    Code:
    IG_TCP_CPORTS="21,25,53,80,110,143,465,953,993,995,2082,2083,2084,2086,2087,2095,2096,3306,6666,7786,8669"
    
    ..remove ports as needed(note that the spaces were added by the forum).

    and...for sshd_config:

    Code:
    # The strategy used for options in the default sshd_config shipped with
    # OpenSSH is to specify options with their default value where
    # possible, but leave them commented.  Uncommented options change a
    # default value.
    
    Port 8669
    #Protocol 2,1
    #ListenAddress 0.0.0.0
    #ListenAddress ::
    


    I have tested this and it works -- so it definately works. You may need to double check in case you missed something. After changing the config, I flushed apf and restarted it, as well as restarting sshd.
     
    #2 WCrooks, Jan 31, 2006
    Last edited: Jan 31, 2006
  3. Lyttek

    Lyttek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    770
    Likes Received:
    3
    Trophy Points:
    18
    Here's mine. The only thing that changes is the port on the sshd_config file (both ports are in the proper section of apf):


    Code:
    Port 8669
    Protocol 2
    ListenAddress 208.29.xxx.xxx
    I've even shut off apf, so it's something with ssh itself. I have another box working on this port.... oh, I've got them backwards... it's working on the FRESH box, not on the RH9 box, if that matters.

    I've shutdown, restarted sshd and apf, tried commenting out the listen address and protocol. It's as if there's another firewall running besides apf, of which I'm not aware.
     
  4. WCrooks

    WCrooks Active Member

    Joined:
    Aug 29, 2003
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Canada
    Perhaps check your running processes?You wouldn't have anything else configured for the port would you?
     
  5. Lyttek

    Lyttek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    770
    Likes Received:
    3
    Trophy Points:
    18
    Good thought... but doesn't look like it. Checking within WHM doesn't show anything.
     
Loading...

Share This Page