0 items
24/7 Support & Sales   0800 128 128
Online Support Linux Servers

Configuring SSH Server on CentOS

To configure your SSH Server you will need to edit /etc/ssh/sshd_config using the following command:

# vi /etc/ssh/sshd_config
  • To disable root logins, edit or add the following line:
    PermitRootLogin no
  • To allow only specific users over SSH edit or add the following line:
    AllowUsers ryan chris
  • Change the listening port of SSH service edit or add the following line:
    Port 11111

Save and quit the SSH configuration file and restart the SSH service to reflect the changes by using the following command:

# service sshd restart

Congratulations, you have configured the SSH Server on CentOS VPS.

Was this helpful? Yes No 88% of people found this helpful.