You can control which users or groups are allowed to SSH into your server. This will ensure that people with weak security practices and people who do not need SSH access to the server can be denied.
To allow a user be able to SSH, we need to change the following line in /etc/ssh/ssh_config
, with the following value:
AllowUsers Skanda Client
The preceding line means that users Skanda
and Client
are allowed to SSH into the server. All other users will be denied. However, to deny a few users and allow all others, use the following line:
DenyUsers Bhargav Guest
You can welcome and display server-specific information to the users with a banner. Each time a user logs into the server, this message can be displayed. This is usually helpful when you want to warn the user about a special server, such as the production server where the user should not be modifying anything. First, change the line in the /etc/ssh/ssh_config
file as follows:
Banner...