How do I change the default SSH port?
Posted by Help Desk (6), Last modified by NOC Desk Monitors on 07 August 2018 11:43 AM
Important: make sure the port you wish to use is opened on your firewall before changing the port number !!!|
Now SSH should be running on the non-default port you specified.
- Login to shell as root.
- Use any preferred editor to edit the file /etc/ssh/sshd_config
- Search for Port option, uncomment it and change the port number.
- Save the changes and close editor.
- Make sure that the port is opened in firewall and restart the firewall.
- Restart sshd service with following command:
service sshd restart