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.

change SSH port Via WHM

Discussion in 'General Discussion' started by crazyaboutlinux, Feb 18, 2009.

  1. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    hi

    can i change SSH port via WHM or else any easy steps for it

    thanks in advance

    nilesh
     
  2. arunsv84

    arunsv84 Well-Known Member

    Joined:
    Oct 20, 2008
    Messages:
    373
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    127.0.0.1
    cPanel Access Level:
    Root Administrator
    You can change the ssh port in the mail configuration file.

    vi /etc/ssh/sshd_config

    Change
    #Port 22

    to

    Port * (any port)

    Also make sure to open your firewall.
     
  3. Lyttek

    Lyttek Well-Known Member

    Joined:
    Jan 2, 2004
    Messages:
    770
    Likes Received:
    3
    Trophy Points:
    18
    I'd open up the port in the firewall first (so as not to forget). (restart the firewall after the change)

    Then specify the port (as the previous instructions make it look like you're trying to run ssh on every port)

    Then you'll have to restart the ssh service after making the change.
     
  4. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    hi

    thanks for the updates

    i know the SSH way & vi is very hardly editor

    you can choose friendly editor like

    nano /etc/ssh/sshd_config

    then restart sshd

    service sshd restart

    Anyways thanks for the updates

    Regards,
    n
     
  5. coder1251

    coder1251 Registered

    Joined:
    Apr 17, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    before changing port for SSH need to be sure than no other application/service use it.
    You can check what ports are using now, and choose different, but it will be nice surprise if you will setup some new soft and after reboot your will be without SSH due ports conflict :D.
    So check new port for using by other services (and not installed too), see list of registered tcp ports before, and choose unused in list.
     
  6. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
  7. PlatinumServerM

    PlatinumServerM Well-Known Member
    PartnerNOC

    Joined:
    Jul 10, 2005
    Messages:
    397
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    New Jersey, USA
    cPanel Access Level:
    Root Administrator
  8. mykkal

    mykkal Well-Known Member

    Joined:
    Feb 9, 2007
    Messages:
    120
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Atlanta, Georgia, United States
    an easy editor

    Pico is the easiest editor to use.

    Thats what they start most college students with. VI is advanced. More advance and unfriendly than it needs to be.

    pico /etc/ssh/sshd_config
     
Loading...

Share This Page