"Unable to open a session" - unable login to centos server from ezeelogin jump server
Unable to open a session- ssh session fails with pam_systemd(sshd:session): Failed to create session
If you are unable to ssh via the ezsh interface and you get the error "unable to open a session" and you find these error on the remote server in /var/log/secure
pam_systemd(sshd:session): Failed to create session: Activation of org.freedesktop.login1 timed out
Sep 4 17:56:05 server2 crond[938922]: pam_systemd(crond:session): Failed to create session: Activation of org.freedesktop.login1 timed out
Sep 4 17:56:05 server2 sshd[938752]: pam_systemd(sshd:session): Failed to create session: Activation of org.freedesktop.login1 timed out
Sep 4 17:56:05 server12 sshd[938752]: pam_unix(sshd:session): session opened for user root by (uid=0)
Sep 4 17:56:05 server12 sshd[938752]: debug1: rekey after 4294967296 blocks
Sep 4 17:56:05 server12 sshd[938752]: debug1: rekey after 4294967296 blocks
Sep 4 17:56:05 server12 sshd[938752]: debug1: ssh_packet_set_postauth: called
Sep 4 17:56:05 server12 sshd[938752]: debug1: Entering interactive session for SSH2.
Sep 4 17:56:05 server12 sshd[938752]: debug1: server_init_dispatch
Sep 4 17:56:05 server12 sshd[938752]: debug1: server_input_channel_open: ctype session rchan 0 win 2097152 max 32768
Sep 4 17:56:05 server12 sshd[938752]: debug1: input_session_request
Sep 4 17:56:05 server12 sshd[938752]: debug1: channel 0: new [server-session]
Sep 4 17:56:05 server12 sshd[938752]: debug1: session_new: session 0
Sep 4 17:56:05 server12 sshd[938752]: debug1: session_open: channel 0
Sep 4 17:56:05 server12 sshd[938752]: debug1: session_open: session 0: link with channel 0
Sep 4 17:56:05 server12 sshd[938752]: debug1: server_input_channel_open: confirm session
Sep 4 17:56:05 server12 sshd[938752]: debug1: server_input_global_request: rtype [email protected] want_reply 1
Sep 4 17:56:05 server12 sshd[938752]: Received disconnect from 112.227.16.12 port 49315:11: Channel failed
Sep 4 17:56:05 server12 sshd[938752]: Disconnected from 112.227.16.12 port 49315
Sep 4 17:56:05 server12 sshd[938752]: debug1: do_cleanup
Sep 4 17:56:05 server12 sshd[938752]: debug1: PAM: cleanup
Sep 4 17:56:05 server12 sshd[938752]: debug1: PAM: closing session
Sep 4 17:56:05 server12 sshd[938752]: pam_unix(sshd:session): session closed for
- Ensure that you are able to ssh from the gateway box to the remote server directly ( bypassing Ezeelogin ezsh interface). If the ssh works, do change the SSH Timeout value to 300 seconds from 10 seconds to rule out network slowness and a connectivity issue.
- Do restart systemd-logind.service on the remote server:
[email protected]:~ systemctl restart systemd-logind.service
[email protected]:~ ls -lah /var/log/btmp
If you are unable to ssh via the ezsh interface and you get the error on /home/{username}/ezsh.log
Authentication by SSH key DB failed :
Channel failed (shell): Timed out waiting on socket
You can find the following logs on /var/log/secure and /var/log/messages
sshd[236622]: Accepted publickey for root from 46.232.178.114 port 40506 ssh2: RSA SHA256:cpVnOWHn+WeiGl4JuYAlMtx39Vx5Dz82CuN7I12yITI
sshd[236622]: pam_unix(sshd:session): session opened for user root by (uid=0)
systemd-logind: New session c100 of user root.
systemd: Started Session c100 of user root.
systemd-logind: Removed session c100.
If the size of /var/log/btmp is high then truncate the logs in /var/log/btmp. You can truncate the logs by running the following command on the remote server.
[email protected]:~ > /var/log/btmp