How to add a subssh user with non privileged remote ssh login user
How to create sub ssh user when a remote server is added with non privileged remote SSH Login User?
This article details on how to add a remote server 'web.eznoc.com' to the Ezeelogin gateway with Remote SSH Login User 'Tech' ( non privileged system user ) and allows the gateway user 'Ted' to log in to the remote server as a SubSSH user 'Dev' ( non privileged system user )
Step 1: Add the remote server (web.eznoc.com) with the non-privileged Remote SSH Login User(tech).
Step 2: Grant necessary privileges to the Remote SSH Login User in the sudoers file on the remote SSH server (web.eznoc.com).
2.a: Create a config file for granting privileges for user group and assign permissions.
[email protected]:~# vim /etc/sudoers.d/user_management
%<new_group_name> ALL=(ALL) NOPASSWD:/usr/bin/sh -c *
eg: tech ALL=(ALL) NOPASSWD:/usr/bin/sh -c *
[email protected]:~# chmod 440 /etc/sudoers.d/user_management
2.b: Check syntax of sudoers file
[email protected]:~# visudo -c
/etc/sudoers: parsed OK
/etc/sudoers.d/user_management: parsed OK
Step 3: Create SubSSH user (Dev) and perform mapping.
3.a: Create SubSSH user
3.b: For mapping SubSSH user based on groups
3.c: For mapping SubSSH user for an gateway user
Step 4: Login to the remote server (web.eznoc.com) via ezsh.
When you click on the server details, you can see that you have logged in to the remote server as the Sub SSH user 'Dev' instead of the non-privileged remote SSH login user 'tech' .
Related articles:
Add a server using SSH key pair
Setup public-key in the remote server
User identity and access management in SSH