How to change ssh port number:
You can change ssh port number of the server by editing the ssh configuration file on the server.
After you have logged in to the server as user: root , you need to edit the configuration file for the SSH service. The configuration file is sshd_config . Also it is highly recommended to take a backup of the configuration file before making any changes to the configuration. So it will help in case of any further issues happen after editing the configuration.
The ssh configuration file is,
/etc/ssh/sshd_config
For taking backup of the file use the copy command,
cp /etc/ssh/sshd_config /etc/ssh/sshd_config_backup
After that edit the file using the file editor,
vi /etc/ssh/sshd_config
Now, change the line ” #Port 22 ” to something like,
Port 55676
Then save the file and restart the ssh service using the command,
/etc/init.d/sshd restart
The port number will be now changed to the new port number you have given. That’s all :)
If you need our help to fix the issue with incoming/outgoing spam from your server. Please feel free to contact us, simply email to support@iserversupport.com
Monthly server support with Unlimited tickets, 24×7 monitoring, Security Audit and lot more for just $59
[sep][/sep][button size=”large” color=”green” title=”Server Management from iServersupport” link=”http://iserversupport.com/cpanel-server-management/”]Server Management at just $59[/button]
Leave A Comment