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.

problem to change ssh port

Discussion in 'General Discussion' started by ullalla, Mar 9, 2011.

  1. ullalla

    ullalla Well-Known Member

    Joined:
    Jan 20, 2006
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    16
    I want to change the default ssh port, I have checked for the port which I want to set is opened in firewall as well I have placed the port at sshd_config file with protocol 2 but still the new port is not taken place.

    Can anyone having any idea on this?
     
  2. LinuxTechie

    LinuxTechie Well-Known Member

    Joined:
    Jan 22, 2011
    Messages:
    502
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hello,

    After changing the port. you need to restart the ssh service.

    service sshd restart

    Did you restart the service?
     
  3. ullalla

    ullalla Well-Known Member

    Joined:
    Jan 20, 2006
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    16
    Dear cPtechie,

    Yes, I have done it already but still no luck... :(
     
  4. LinuxTechie

    LinuxTechie Well-Known Member

    Joined:
    Jan 22, 2011
    Messages:
    502
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Hello,

    While using the specified port are you getting connection refused or connection timed out? It will be also good if you paste sshd_config's first portion here so that I can check whether it is specified correctly.
     
  5. ullalla

    ullalla Well-Known Member

    Joined:
    Jan 20, 2006
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    16
    Dear cPtechie

    m getting "network error_ connection timed out" error

    Here is sshd_config portion

    Port 2794
    #Protocol 2,1
    Protocol 2
    #AddressFamily any
    #ListenAddress 0.0.0.0
    #ListenAddress ::

    Let me know if you need any more details.
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    You would not want to have two ports listed in the /etc/ssh/sshd_config file, so please remove the port that is not the one you do not want to use, then restart sshd again:

    Code:
    /etc/init.d/sshd restart
     
  7. ullalla

    ullalla Well-Known Member

    Joined:
    Jan 20, 2006
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    16
    Dear cPtechie,

    There is only one port 2794 but still no success :(

    any other solution ?
     
  8. linux7802

    linux7802 Well-Known Member

    Joined:
    Dec 14, 2007
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    It seems be that you haven't enabled port in server firewall. Enable new SSH port in server firewall.
     
  9. ullalla

    ullalla Well-Known Member

    Joined:
    Jan 20, 2006
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    16
    I have already opned the port in server fireall csf...
     
  10. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Please contact your hosting provider to have them assist further then if the port isn't changing. We cannot really troubleshoot it further than what we have, and you cannot open a ticket with our support over SSH port issues because those aren't related to cPanel itself.
     
Loading...

Share This Page