- Plesk for Linux
How to change the SSH port?
Connect to the server using SSH.
Open the configuration file
#Port 22line in the config file and specify other preferable value instead of standard port
#Port 22line in the config file and add the custom port, the connection will be available for both ports, for example:
Restart sshd service:
# service sshd restart
Note: the new port must be opened in firewall.
Warning: the incorrect SSH configuration may lead to server inaccessibility via SSH.
If Fail2Ban is enabled on the server, change ssh jail settings as follows:
- Log into Plesk.
- Open Tools & Settings > IP Address Banning (Fail2Ban) > Jails tab:
- Open ssh jail > Change Settings > change port value from ssh to the new port, e.g 8888: