Skip to Content

SSH Connection to a Remote Server Using the Same Username as SSH Gateway User

How to establish an SSH connection to a remote server while maintaining the same username used for logging into the Ezeelogin SSH gateway?


Overview: This article explains how to ensure that an SSH gateway user logs into a remote server using the same username they used to access the Ezeelogin gateway. This is accomplished by ensuring the same username exists on both the gateway and remote servers.


This can be achieved using the pass user through feature.

Example: SSH gateway user 'Ted' would be logged in as system user 'Ted' on the remote server as well.

A user by the same name as the SSH gateway user should exist on the remote servers for the  'Pass user through' feature to work. If you want the remote SSH users to be managed automatically, then use the sub SSH user feature.

Step 1: Navigate to Users -> Add/Edit  and change Pass User Through to Yes

2. How to view if the gateway user is mapped as the pass user through?

Step 2(A): Login to Ezeelogin backend(ezsh) and press the 'Tab' key on the selected server to view the mapped details.

Step 2(B): Login to Ezeelogin GUI and press the '+' icon on the left side of the server name to expand and view the mapped details.

  • You can add an SSH private key and passphrase or it will ssh to the remote server with the same password as the Ezeelogin gateway user. 
  • Also, you can copy the SSH Global Public Key and paste it under /home/{username}/.ssh/authorized_keys file so that you do not have to enter the user's password or add an extra key. 

Related Articles:

Different types of users in Ezeelogin.

How to add sub ssh users on remote servers and restrict commands via sudoers file

User prvilege escalation for particular time