Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agent forwarding login stuck #2454

Open
tmp-reg opened this issue Jul 17, 2024 · 1 comment
Open

Agent forwarding login stuck #2454

tmp-reg opened this issue Jul 17, 2024 · 1 comment

Comments

@tmp-reg
Copy link

tmp-reg commented Jul 17, 2024

ver: 2.7-prerelease
system: Windows 10
Linux Server ssh version: OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017

SecureCRT does not rely on the local ssh-agent service, Just check Add key to agent and Enable OpenSSH agent forwarding.
WindTerm operation is more complicated. You need to start the ssh-agent service and then manually execute ssh-add private_key to add the key.
The server login is always stuck. I have to use ctrl+c to terminate it. Then the terminal symbol becomes -bash-4.2$.

linux server log:

Jul 17 20:57:07 ****** sshd[941]: debug1: Forked child 9867.
Jul 17 20:57:07 ****** sshd[9867]: debug1: Set /proc/self/oom_score_adj to 0
Jul 17 20:57:07 ****** sshd[9867]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8
Jul 17 20:57:07 ****** sshd[9867]: debug1: inetd sockets after dupping: 3, 3
Jul 17 20:57:07 ****** sshd[9867]: Connection from ***local IP*** port ***local port*** on ***remote IP*** port ***remote port***
Jul 17 20:57:07 ****** sshd[9867]: debug1: Client protocol version 2.0; client software version libssh_0.9.6
Jul 17 20:57:07 ****** sshd[9867]: debug1: no match: libssh_0.9.6
Jul 17 20:57:07 ****** sshd[9867]: debug1: Local version string SSH-2.0-OpenSSH_7.4
Jul 17 20:57:07 ****** sshd[9867]: debug1: Enabling compatibility mode for protocol 2.0
Jul 17 20:57:07 ****** sshd[9867]: debug1: SELinux support disabled [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: permanently_set_uid: 74/74 [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: list_hostkey_types: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: SSH2_MSG_KEXINIT sent [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: SSH2_MSG_KEXINIT received [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: kex: algorithm: curve25519-sha256 [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: kex: host key algorithm: ssh-ed25519 [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: kex: client->server cipher: aes256-gcm@openssh.com MAC: <implicit> compression: none [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: kex: server->client cipher: aes256-gcm@openssh.com MAC: <implicit> compression: none [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: kex: curve25519-sha256 need=32 dh_need=32 [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: kex: curve25519-sha256 need=32 dh_need=32 [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: expecting SSH2_MSG_KEX_ECDH_INIT [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: rekey after 4294967296 blocks [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: SSH2_MSG_NEWKEYS sent [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: expecting SSH2_MSG_NEWKEYS [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: SSH2_MSG_NEWKEYS received [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: rekey after 4294967296 blocks [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: KEX done [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: userauth-request for user admin service ssh-connection method none [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: attempt 0 failures 0 [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: PAM: initializing for "admin"
Jul 17 20:57:07 ****** sshd[9867]: debug1: PAM: setting PAM_RHOST to "***local IP***"
Jul 17 20:57:07 ****** sshd[9867]: debug1: PAM: setting PAM_TTY to "ssh"
Jul 17 20:57:07 ****** sshd[9867]: debug1: userauth-request for user admin service ssh-connection method publickey [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: attempt 1 failures 0 [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: userauth_pubkey: test whether pkalg/pkblob are acceptable for RSA SHA256:****** [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: temporarily_use_uid: 1001/1001 (e=0/0)
Jul 17 20:57:07 ****** sshd[9867]: debug1: trying public key file /home/admin/.ssh/authorized_keys
Jul 17 20:57:07 ****** sshd[9867]: debug1: fd 4 clearing O_NONBLOCK
Jul 17 20:57:07 ****** sshd[9867]: debug1: matching key found: file /home/admin/.ssh/authorized_keys, line 13 RSA SHA256:******
Jul 17 20:57:07 ****** sshd[9867]: debug1: restore_uid: 0/0
Jul 17 20:57:07 ****** sshd[9867]: Postponed publickey for admin from ***local IP*** port ***local port*** ssh2 [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: userauth-request for user admin service ssh-connection method publickey [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: attempt 2 failures 0 [preauth]
Jul 17 20:57:07 ****** sshd[9867]: debug1: temporarily_use_uid: 1001/1001 (e=0/0)
Jul 17 20:57:07 ****** sshd[9867]: debug1: trying public key file /home/admin/.ssh/authorized_keys
Jul 17 20:57:07 ****** sshd[9867]: debug1: fd 4 clearing O_NONBLOCK
Jul 17 20:57:07 ****** sshd[9867]: debug1: matching key found: file /home/admin/.ssh/authorized_keys, line 13 RSA SHA256:******
Jul 17 20:57:07 ****** sshd[9867]: debug1: restore_uid: 0/0
Jul 17 20:57:07 ****** sshd[9867]: debug1: do_pam_account: called
Jul 17 20:57:07 ****** sshd[9867]: Accepted publickey for admin from ***local IP*** port ***local port*** ssh2: RSA SHA256:******
Jul 17 20:57:07 ****** sshd[9867]: debug1: monitor_child_preauth: admin has been authenticated by privileged process
Jul 17 20:57:07 ****** sshd[9867]: debug1: monitor_read_log: child log fd closed
Jul 17 20:57:07 ****** sshd[9867]: debug1: SELinux support disabled
Jul 17 20:57:07 ****** sshd[9867]: debug1: PAM: establishing credentials
Jul 17 20:57:07 ****** sshd[9867]: pam_unix(sshd:session): session opened for user admin by (uid=0)
Jul 17 20:57:07 ****** sshd[9867]: User child is on pid 10017
Jul 17 20:57:07 ****** sshd[10017]: debug1: PAM: establishing credentials
Jul 17 20:57:07 ****** sshd[10017]: debug1: permanently_set_uid: 1001/1001
Jul 17 20:57:07 ****** sshd[10017]: debug1: rekey after 4294967296 blocks
Jul 17 20:57:07 ****** sshd[10017]: debug1: rekey after 4294967296 blocks
Jul 17 20:57:07 ****** sshd[10017]: debug1: ssh_packet_set_postauth: called
Jul 17 20:57:07 ****** sshd[10017]: debug1: Entering interactive session for SSH2.
Jul 17 20:57:07 ****** sshd[10017]: debug1: server_init_dispatch
Jul 17 20:57:07 ****** sshd[10017]: debug1: server_input_channel_open: ctype session rchan 43 win 64000 max 261120
Jul 17 20:57:07 ****** sshd[10017]: debug1: input_session_request
Jul 17 20:57:07 ****** sshd[10017]: debug1: channel 0: new [server-session]
Jul 17 20:57:07 ****** sshd[10017]: debug1: session_new: session 0
Jul 17 20:57:07 ****** sshd[10017]: debug1: session_open: channel 0
Jul 17 20:57:07 ****** sshd[10017]: debug1: session_open: session 0: link with channel 0
Jul 17 20:57:07 ****** sshd[10017]: debug1: server_input_channel_open: confirm session
Jul 17 20:57:07 ****** sshd[10017]: debug1: server_input_channel_req: channel 0 request auth-agent-req@openssh.com reply 0
Jul 17 20:57:07 ****** sshd[10017]: debug1: session_by_channel: session 0 channel 0
Jul 17 20:57:07 ****** sshd[10017]: debug1: session_input_channel_req: session 0 req auth-agent-req@openssh.com
Jul 17 20:57:07 ****** sshd[10017]: debug1: temporarily_use_uid: 1001/1001 (e=1001/1001)
Jul 17 20:57:07 ****** sshd[10017]: debug1: restore_uid: (unprivileged)
Jul 17 20:57:07 ****** sshd[10017]: debug1: channel 1: new [auth socket]
Jul 17 20:57:07 ****** sshd[10017]: debug1: server_input_channel_req: channel 0 request pty-req reply 1
Jul 17 20:57:07 ****** sshd[10017]: debug1: session_by_channel: session 0 channel 0
Jul 17 20:57:07 ****** sshd[10017]: debug1: session_input_channel_req: session 0 req pty-req
Jul 17 20:57:07 ****** sshd[10017]: debug1: Allocating pty.
Jul 17 20:57:07 ****** sshd[9867]: debug1: session_new: session 0
Jul 17 20:57:07 ****** sshd[9867]: debug1: SELinux support disabled
Jul 17 20:57:07 ****** sshd[10017]: debug1: session_pty_req: session 0 alloc /dev/pts/4
Jul 17 20:57:08 ****** sshd[10017]: debug1: server_input_channel_req: channel 0 request shell reply 1
Jul 17 20:57:08 ****** sshd[10017]: debug1: session_by_channel: session 0 channel 0
Jul 17 20:57:08 ****** sshd[10017]: debug1: session_input_channel_req: session 0 req shell
Jul 17 20:57:08 ****** sshd[10017]: Starting session: shell on pts/4 for admin from ***local IP*** port ***local port*** id 0
Jul 17 20:57:08 ****** sshd[10175]: debug1: Setting controlling tty using TIOCSCTTY.
Jul 17 20:57:08 ****** sshd[10017]: debug1: server_input_channel_req: channel 0 request window-change reply 0
Jul 17 20:57:08 ****** sshd[10017]: debug1: session_by_channel: session 0 channel 0
Jul 17 20:57:08 ****** sshd[10017]: debug1: session_input_channel_req: session 0 req window-change
Jul 17 20:57:08 ****** sshd[10017]: debug1: server_input_channel_req: channel 0 request window-change reply 0
Jul 17 20:57:08 ****** sshd[10017]: debug1: session_by_channel: session 0 channel 0
Jul 17 20:57:08 ****** sshd[10017]: debug1: session_input_channel_req: session 0 req window-change
Jul 17 20:57:09 ****** sshd[10017]: debug1: channel 2: new [accepted auth socket]
@tmp-reg
Copy link
Author

tmp-reg commented Jul 17, 2024

Use ctrl+$ or ctrl+\ to interrupt the stuck state and restore to normal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant