Skip to Content

How to add ssh public key for passwordless authentication in ssh

Enabling Passwordless SSH Login Using Public Keys


Overview: This article offers a comprehensive guide on configuring passwordless SSH authentication for users accessing the Ezeelogin backend shell (ezsh). It details the process of adding SSH public keys to the Ezeelogin system, allowing users to log in seamlessly without being prompted for passwords.


SSH Gateway users can add their SSH public keys for passwordless authentication to log into the ezsh shell ( ezeelogin backend shell).  Press the F2 key in the ezeelogin shell to enter your public keys for SSH authorized keys-based authentication so that the user's password will not be prompted again.


Step 1: Log into the Ezeelogin backend interface (known as the ezsh shell). Start by entering your password. If two-factor authentication (2FA) is enabled, you’ll need to complete that step as well. This will give you access to the necessary configuration options.

Step 2: Once you're in the ezsh shell, press "F2" or "#" on your keyboard. This will take you to the section where you can manage SSH public keys.

Step 3: In this section, you’ll find a prompt where you can add SSH public keys. Paste the SSH public key you want to use into the provided space and press Enter to confirm and save it. This key will now be used for authentication.

If you need to add more SSH public keys, you can also do so by editing the file located at /home/ezeelogin_user/.ssh/authorized_keys. Simply append the new keys to this file, ensuring each key is on a new line.

The public key you are adding to the ezeelogin master node will not be synced/copied to the slave/secondary node.

You should need to copy the public key from the master node to the slave node and vice versa.

Also as an alternative way,

Step 1: Create an authorized_keys file and paste your public key inside it.
Step 2: After transferring the public keys into the authorized_keys file, Follow the below steps;-

root@gateway:~# sftp ezeeloginuser@gatewayip

Step 3: Enter the password of the Ezeelogin user when prompted.

sftp> cd .ssh/
sftp> put authorized_keys


Related Articles:

Different types of SSH authentication keys

Set SSH Key Expiry for the gateway users

Enable/Disable password or key-based authentication

How can I add more than one public key to ezeelogin users?