Tuesday, April 12, 2016

Configure SSH Restrictions

1. Disable Root SSH Login

vi /etc/ssh/sshd_config

PermitRootLogin = no

2. Disable User SSH Login

vi /etc/ssh/sshd_config

AllowUsers = mainak

3. After any change we need to restart the sshd service.

service sshd restart

or

/etc/init.d/sshd restart

No comments: