NetBackup IT Analytics - How to disable SSH login on the Portal server for a user

Article: 100056003
Last Published: 2023-05-15
Ratings: 2 1
Product(s): NetBackup IT Analytics, NetBackup

Description

If for security reasons a local user account (aptare) needs to be denied login access to the portal server using SSH.

Use the following steps to disable (deny) SSH login for a local account:

Edit the DenyUsers directives on the Portal server in the /etc/ssh/sshd_config file.

1) To deny SSH access to specific user called aptare edit /etc/ssh/sshd_config file:

$ sudo vi /etc/ssh/sshd_config

2) Edit the following line and add the user:
DenyUsers       aptare

Note: Make sure the space indention is correct. Don't use Space-bar. Press the Tab key and add the username.

3) Restart SSH service to take effect the changes:
$ sudo systemctl restart sshd

4) Now try to SSH to your Linux machine from blocked user account, for example aptare:
$ ssh aptare@xxx.xxx.xxx.xxx

Note: You will get the following message:

aptare@xxx.xxx.xxx.xxx's password: 
Permission denied, please try again.
aptare@xxx.xxx.xxx.xxx's password:

 

Was this content helpful?