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.

How to change ssh-port when transferring accounts

Discussion in 'General Discussion' started by petfut, Dec 5, 2005.

  1. petfut

    petfut Well-Known Member

    Joined:
    Feb 14, 2005
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    6
    My server were secured few days ago and the ssh port were changed to something else than 22. Now if I try to use WHM function to copy accounts from other servers, it wont work because WHM tries to connect to port 22.

    How can I change this port to something else?
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    edit /etc/ssh/sshd_config
     
  3. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    Here is the steps to change SSH port which works fine for me

    To change the SSH port number login as root, and edit /etc/ssh/sshd_config

    Find the line that says Port 22 and change 22 to any number between 1024->65535 (above 30000 is best) and save the file.

    Once done, run:

    /etc/init.d/sshd restart

    Now start a new SSH session (don’t close your existing one), to make sure that you can get in.

    And as per cPtechie the new port must be opened in the firewall e.g CSF firewall
     
  4. 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
    Hello petfut,

    Given your question mentions having already changed the SSH port and asking how to get WHM transfer accounts to recognize the port as one *other* than 22, I imagine you would like steps on how to properly transfer rather than how to change the SSH port, since that appears to already have been done.

    If you use WHM > Transfers > Copy an account from another server or WHM > Transfers > Copy multiple accounts/packages from another server options, you have the following field that you can change from port 22 to the new SSH port:

    You do not have the option to change the port if you use WHM > Transfers > Copy an account from another server with account password area.

    Thanks.
     
Loading...

Share This Page