Question
How do you change the SSH port?
Answer
- 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_configin your preferred text editor. Locate the "Port" line.
Note: 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:
CONFIG_TEXT: Port $portnumber
Note: "$portnumber" must be replaced with the desired port number.
Restart the SSH service:
# /scripts/restartsrv_sshd
Comments
0 comments
Article is closed for comments.