Sign Up / Log In
Need help?
000 800 100 3215
Online Support Linux Servers

How to Configure 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 78% of people found this helpful.
we're
online
Need Help? Chat Now