Introduction
This article covers changing the SSH port on your server.
Procedure
- Configure any firewalls that may restrict traffic to the server to allow traffic for the new SSH port.
- Access the server's command line as the 'root' user via "Terminal" in WHM or a remote console.
- Open /etc/ssh/sshd_config. in your preferred text editor.
- Locate the "Port" line.
- If the line does not exist, it must be added.
- If the line is commented out(# at start of line), it must be uncommented.
- Set the "Port" value to the desired port number.
Port $portnumber
Please note that "$portnumber" must be replaced with the desired port number. - Restart the SSH service.
/scripts/restartsrv_sshd
Comments
0 comments
Article is closed for comments.