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 set hostname using ssh

Discussion in 'General Discussion' started by jestin_virtual, Sep 8, 2009.

  1. jestin_virtual

    jestin_virtual Active Member

    Joined:
    Sep 2, 2009
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Hello ,

    My sever Detail : Centos / Cpanel


    i have entered my Hostname in WHM but host name has not been updated ( i have checked in some lookup websites )

    Please let me know how to set the hostname using SSH


    Thank You
     
  2. MattCurry

    MattCurry Well-Known Member

    Joined:
    Aug 18, 2009
    Messages:
    275
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Tx
    Changing your hostname

    Hello,

    In order to change your hostname and not run into issues you will need to follow these steps:

    (from CLI)

    hostname HOSTNAME
    modify /etc/hosts
    run /usr/local/cpanel/cpkeyclt

    That should get it updated without any issues. Please let me know if you have any questions.
     
  3. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Which interface in WHM did you use to set the hostname?

    If you used basic cPanel/WHM Setup then no, that interface will not change your hostname.

    However if you used the Hostname interface in Networking Setup then your hostname should have been changed.
     
  4. jestin_virtual

    jestin_virtual Active Member

    Joined:
    Sep 2, 2009
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Hello

    i don`t have the directory "hosts " in /etc
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    hosts is the name of a file, it is not a directory. In a *nix environment, it is common for files to have no extensions (e.g. /etc/hosts, /usr/local/cpanel/logs/access_log).
     
Loading...

Share This Page