Securing SSH - tmansfield42/Tech-Journal GitHub Wiki

Open the SSH configuration file sshd_config with the text editor vi: vi /etc/ssh/sshd_config. In the line PermitRootLogin yes replace the word Yes with the word No. Save the file. Restart the service. Ubuntu. service ssh restart. CentOS 7. systemctl restart sshd.