How to… Change Your Hostname on Your CentOS Server
How To...Published July 11, 2010 at 12:45 pm No Comments
Changing the hostname on your CentOS linux-based server is pretty easy. Go to terminal, assuming you are a Mac or Linux user or use Putty or CYGWIN on Windows. (you will find links for these below)
1. Go to /etc/sysconfig
2. nano network
3. Replace the hostname with your hostname, and save the file.
4. Run “hostname ____” in SSH * (replace ___ with your hostname)
Then you are all set! Your hostname is changed.
*Notes
What is SSH?
A: Secure Shell
Wikipedia defines SSH as “intended to provide confidentiality and integrity of data over an insecure network, such as the Internet.” It is a network protocol allowing logging into a remote machine allowing you to execute commands and data to be exchanged using a secure channel.
Why should you use SSH?
A: Security
Reduce security threats by using SSH for remote shell logins. The SSH client and server use digital signatures for verification. Data between your machine and the remote machine is also encrypted.
How to set up SSH?
A: It’s already there on Linux and Macs, windows users can install CYGWIN or PUTTY
Q: Where can I download Putty from?
A: Right here
How to use SSH?
A: First open up a SSH connection with the server, to do this you need an SSH Client. We personally recommend Putty and a download is found in the questions and answers section. What is putty? Read about it here.
Next thing we need to do is SSH into our server, you will need to install putty to-do so. After doing so we then need to open Putty and get ready to SSH into our brand new server. Now it’s time to connect to the server, in the IP field put the main IP address allocated to your server (Not the SolusVM Login IP, But the one assigned to your VPS, if you are unsure there is a guide on how to find out this IP at the bottom of the tutorial) and in the port field change it to 22 if not automatically done so. Now under saved sessions simply type in a name and press save so you don’t have to fill this out every time you login. Now just press connect.
Now you have entered your details, assuming this is the first time you have connected to SSH on your computer a box will pop up informing you about the servers host key isn’t cached in your registry, simply ignore this message and press yes. Now we are logged in SSH.





