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!

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:
    842
    Likes Received:
    14
    Trophy Points:
    168
    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:
    166
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. mctDarren

    mctDarren Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    664
    Likes Received:
    3
    Trophy Points:
    168
    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:
    842
    Likes Received:
    14
    Trophy Points:
    168
    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:
    3
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    Root Administrator
    That would do it! Glad you worked it out.
     
Loading...

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