Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    56
    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:
    66
    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,563
    Likes Received:
    42
    Trophy Points:
    308
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. jestin_virtual

    jestin_virtual Active Member

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

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

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,216
    Likes Received:
    10
    Trophy Points:
    313
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice