How to limit SSH User Logins?

This will limit remote access to those users who really need it.

  • Open the /etc/ssh/sshd_config file.
    • # vi /etc/ssh/sshd_config
  • Add an AllowUsers line at the bottom of the file with a space separated by list of usernames. For example, user tecmint and sheena both have access to remote ssh.
    • AllowUsers david mark
  • Now restart ssh service.
  • 5 Users Found This Useful
Was this answer helpful?

Related Articles

Connecting to your Linux VPS

Now you received your details you’ll connect to it via SSH if you have a Linux VPS: If your...

SSH is not working?

Please follow the steps below if SSH on your server is not working - Please make sure...

How to setup VPN server (PPTP on CentOS, RedHat and Ubuntu)?

This howto describes the steps in how to setup a PPTP VPN on Centos, Fedora, Debian, and Ubuntu...

How to install OpenVPN on Linux?

apt-get install openvpn openssl udev wget...

How to change root password on Linux VPS?

If you don't remember the password, please use the following steps for changing the root password...