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.

SSH port and protocol

Discussion in 'General Discussion' started by BW -Tim, Aug 25, 2006.

  1. BW -Tim

    BW -Tim Well-Known Member

    Joined:
    Jun 3, 2006
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    How do I change SSH port and protocol?

    I have edited /etc/ssh/sshd_config and /etc/ssh/ssh_config and restarted SSH, but it doesn't work, and users get a Connection Refused error. Is there anywhere else I need to update?
     
    #1 BW -Tim, Aug 25, 2006
    Last edited: Aug 25, 2006
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,465
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Port opened on firewall?
     
  3. BW -Tim

    BW -Tim Well-Known Member

    Joined:
    Jun 3, 2006
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    Yup, on both of them :)
     
    #3 BW -Tim, Aug 25, 2006
    Last edited: Aug 25, 2006
  4. websupport

    websupport Well-Known Member

    Joined:
    Jun 24, 2006
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    6
    Check file /etc/services

    Check /etc/services

    Also change the ssh line in /etc/services to <portno.>

    :)
     
  5. BW -Tim

    BW -Tim Well-Known Member

    Joined:
    Jun 3, 2006
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    I've changed it, but it still doesn't work
     
    #5 BW -Tim, Aug 25, 2006
    Last edited: Aug 25, 2006
  6. websupport

    websupport Well-Known Member

    Joined:
    Jun 24, 2006
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    6
  7. websupport

    websupport Well-Known Member

    Joined:
    Jun 24, 2006
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    6
  8. 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
    How about editing /etc/xinetd.d/sshd? Find the port line and edit it to new port. Close, restart SSH?
     
  9. BW -Tim

    BW -Tim Well-Known Member

    Joined:
    Jun 3, 2006
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    I didn't have a /etc/xinetd.d/sshd file so created one and put in what that other thread said, and restarted SSH, but it didn't work.

    When I unhash the protocol and port no from ssh_config and sshd_config files, SSH doesn't work, but WHM (specifically configserver firewall security scan) says the port has changed- could this have something to do with it?
     
Loading...

Share This Page