Hang if running 'ssh' command on PowerShell 7 or WSL 2 command shell

Terry Chan 1 Reputation point
2022-11-30T06:18:00.407+00:00

Hi,

I am running Windows 11 Prp:
Edition Windows 11 Pro
Version 22H2
Installed on ‎12 ‎May ‎2022
OS build 22623.891
Experience Windows Feature Experience Pack 1000.22637.1000.0

When I run the command 'ssh -vv <REMOTE IP>', the result is OK.
When I run the command 'ssh -vv <REMOTE IP> /bin/sh', the result is HANGING with the below information:

...
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: C:\Users\terry/.ssh/id_rsa RSA SHA256:lApUVEugTQZtVuQ7iFdOMXoRglo/fwRQdSZoBTfoyWU
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: C:\Users\terry/.ssh/id_dsa
debug1: Trying private key: C:\Users\terry/.ssh/id_ecdsa
debug1: Trying private key: C:\Users\terry/.ssh/id_ecdsa_sk
debug1: Trying private key: C:\Users\terry/.ssh/id_ed25519
debug1: Trying private key: C:\Users\terry/.ssh/id_ed25519_sk
debug1: Trying private key: C:\Users\terry/.ssh/id_xmss
debug2: we did not send a packet, disable method
debug1: Next authentication method: password
terrychan@10.6.72.93's password:
debug2: we sent a password packet, wait for reply
debug1: Authentication succeeded (password).
Authenticated to 10.6.72.93 ([10.6.72.93]:22).
debug1: channel 0: new [client-session]
debug2: channel 0: send open
debug1: Requesting ******@openssh.com
debug1: Entering interactive session.
debug1: pledge: filesystem full
debug1: client_input_global_request: rtype ******@openssh.com want_reply 0
debug1: client_input_hostkeys: searching C:\Users\terry/.ssh/known_hosts for 10.6.72.93 / (none)
debug1: client_input_hostkeys: searching C:\Users\terry/.ssh/known_hosts2 for 10.6.72.93 / (none)
debug1: client_input_hostkeys: hostkeys file C:\Users\terry/.ssh/known_hosts2 does not exist
debug1: client_input_hostkeys: no new or deprecated keys from server
debug2: channel_input_open_confirmation: channel 0: callback start
debug2: fd 3 setting TCP_NODELAY
debug2: client_session2_setup: id 0
debug1: Sending command: /bin/sh
debug2: channel 0: request exec confirm 1
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 2097152
debug2: channel_input_status_confirm: type 99 id 0
debug2: exec request accepted on channel 0

Please help to investigate, thank you!
Terry

Windows for business Windows Client for IT Pros User experience Other
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.