Skip to Content

Error: User add failed. Cannot add user on this node: FAILED: to establish SSH session

How to solve Error: User add failed. Cannot add user on this node: FAILED: to establish SSH session 


Overview: This article provides steps to resolve the error "Error: User add failed. Cannot add user on this node: FAILED: to establish SSH session" in the Ezeelogin GUI when adding a gateway user.



Step 1: Ensure that iptables or the firewall is not blocking SSH traffic. Add the following rule on the gateway server to allow traffic from localhost:

root@gateway:~# iptables -A INPUT -p tcp -s localhost -j ACCEPT
root@gateway:~# csf -a 127.0.0.1

Step 2: Verify SSH access to localhost by running the following commands. If a custom SSH port is being used, specify it with the -p option.

ssh root@localhost OR ssh [email protected] OR ssh root@localhost -p [port]

Step 3: Make sure SSHD is not blocked in /etc/hosts.allow or /etc/hosts.deny. Add the following line to /etc/hosts.allow to allow SSH access from localhost:

root@gateway:~# vim /etc/hosts.allow

sshd : localhost : allow

Step 4: Verify the SSH port used on the gateway server with the following command.

root@gateway:~# cat /etc/ssh/sshd_config | grep Port
Port 22
#Gateway Ports no

Step 5: If a custom SSHD port is being used on the gateway server, ensure it is updated in Settings -> Miscellaneous -> Gateway SSH Port to match the current SSHD listening port on the SSH gateway server.


Related Articles: