Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Sep 2009
    Posts
    45

    Default How to set hostname using ssh

    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. #2
    Member
    Join Date
    Aug 2009
    Location
    Houston, Tx
    Posts
    275

    Default 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. #3
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by jestin_virtual View Post
    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
    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.
    Kenneth
    Product Manager
    cPanel, Inc.

  4. #4
    Member
    Join Date
    Sep 2009
    Posts
    45

    Default

    Quote Originally Posted by cPanelMattCurry View Post
    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.
    Hello

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

  5. #5
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by jestin_virtual View Post
    Hello

    i don`t have the directory "hosts " in /etc
    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).

Similar Threads & Tags
Similar threads

  1. Set Default language for hostname (cpanel web with SSL)
    By strikinado in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 06-16-2008, 09:40 AM
  2. SSH [root@hostname ~]# thing
    By SNN in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 03-12-2008, 09:58 PM
  3. Hostname Error but the hostname is set correctly
    By rodstewart in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 04-05-2005, 11:19 AM
  4. set exim hostname
    By ntwaddel in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-03-2004, 03:37 PM
  5. Set SSH timeout
    By Wallaby in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 01-28-2004, 03:50 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube