Changing the SSH port of RedHat or Cent Os is not a tough job. Any administrator can change it by just editing sshd_config file and then reloading the service.
Step 1. Edit the sshd_config
vi /etc/ssh/sshd_config
Step 2. Change the Port No
You will find something like
#Port 22
Simply change this like
Port 2222
Step 3. Save and Exit
Step 4. Reload the New Configuration
service sshd reload
You are done and now you can test your new configuration using this command
ssh username@myhostnaname.com -p 2222
Precaution: Before logging out make sure your 2222 or the port you have set is open. Otherwise you will no be able to log in using that port. Check your firewall settings for this.

I am a simple man living in this world working in IT field. I love Music, playing soccer, traveling new places. By profession I am a software engineer and enjoy my job. I love researching on new technologies such as programming languages.
No comments yet.