Login into the gateway server as a gateway user with bash shell
How to login to the gateway server as a gateway user with Bash shell?
Overview: This article describes how to log in to the gateway server as a gateway user with the Bash shell by updating user settings, modifying SSH configurations, and integrating the server in Ezeelogin.
Step 1: Add a gateway user from webpanel.
Step 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
Step 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
Step 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
Step 5: Add the gateway server to the Ezeelogin GUI as the remote server with the new port number. Refer below screenshot.
Step 6: Login to ezsh and press the tab key to view the server details. Refer below screenshot.
Step 7: Login to the server, and the gateway user will be logged in with the bash shell on the gateway server.
Related Articles: