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.

changed ssh port - cant login on new port

Discussion in 'General Discussion' started by 4u123, Mar 21, 2006.

  1. 4u123

    4u123 Well-Known Member
    PartnerNOC

    Joined:
    Jan 2, 2006
    Messages:
    765
    Likes Received:
    1
    Trophy Points:
    18
    Hi, I'm puzzled.

    I've edited /etc/ssh/sshd_config and changed the ssh port - Ive edited etc/apf/conf.apf and removed port 22 and added the new port.

    I restarted both services.

    If I try to ssh to the server I now get connection refused.

    What did I miss ?
     
  2. MMarko

    MMarko Well-Known Member

    Joined:
    Apr 18, 2005
    Messages:
    316
    Likes Received:
    0
    Trophy Points:
    16
  3. mctDarren

    mctDarren Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    664
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    New Jersey
    cPanel Access Level:
    Root Administrator
    Restarting APF might not be enough. You may have to flush iptables as well.

    /etc/apf/apf -f
    /etc/apf/apf -r

    See if that does the trick... :)
     
  4. 4u123

    4u123 Well-Known Member
    PartnerNOC

    Joined:
    Jan 2, 2006
    Messages:
    765
    Likes Received:
    1
    Trophy Points:
    18
    You wont believe what I did!

    I changed the port in the ssh config file but I didnt notice that it was actually commented out!

    So when I tried to login on the new port - I couldnt because the default port was still being used.

    I feel stupid haha

    Thanks for your help all the same!

    :eek:
     
  5. mctDarren

    mctDarren Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    664
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    New Jersey
    cPanel Access Level:
    Root Administrator
    That would do it! Glad you worked it out.
     
Loading...

Share This Page