Skip to Content

Login into the gateway server as a gateway user with bash shell

How to login into the gateway server as a gateway user with Bash shell?

1. Add a gateway user in ezeelogin

2. Change the shell of the gateway user to /bin/bash.

root@gateway ~]# chsh -s /bin/bash username

eg:  root@gateway ~]# chsh -s /bin/bash alex

3. Run the below command to confirm the shell of the gateway user.

root@gateway ~]# getent passwd username | cut -d: -f7

eg:  root@gateway ~]# getent passwd alex | cut -d: -f7

4. Edit the sshd configuration file of the gateway server and add a new port number and force the user to use the ezsh shell with default port 22.

root@gateway ~]# vim /etc/ssh/sshd_config

Port 22
Port 2233
Match LocalPort 22 User alex
  ForceCommand /usr/local/bin/ezsh

root@gateway ~]# systemctl restart sshd

5. Add the gateway server to the Ezeelogin GUI as the remote server with the new port number. Refer below screenshot.

6. Login to ezsh and press the tab key to view the server details. Refer below screenshot.

7. Login to the server, and the gateway user will be logged in with the bash shell on the gateway server.