PowerShell / PowerShell/Win32-OpenSSH
shell request failed on channel 0
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 8.3k
- Forks
- 819
- PR merge metrics
- No merged PRs in 30d
Description
"OpenSSH for Windows" version
OpenSSH_for_Windows_8.1p1
Server OperatingSystem
Windows 10
Client OperatingSystem
Windows 10
What is failing
I cannot connect to my sshd with any ssh client, such as OpenSSH for Windows or Putty.
I am trying to connect with "ssh username@127.0.0.1", and it fails with message "shell request failed on channel 0"
Only when I type "ssh username@127.0.0.1 cmd", I can get shell. Adding "ForceCommand cmd" to sshd_config did not help.
My sshd_config differs from default only with string "PasswordAuthentication no".
Part of sshd log:
Accepted publickey for *username* from 127.0.0.1 port 60715 ssh2: RSA ***KEY***
debug1: monitor_child_preauth: user has been authenticated by privileged process
debug3: mm_get_keystate: Waiting for new keys
debug3: mm_request_receive_expect entering: type 26
debug3: mm_request_receive entering
debug3: mm_get_keystate: GOT new keys
debug1: auth_activate_options: setting new authentication options [preauth]
debug2: userauth_pubkey: authenticated 1 pkalg rsa-sha2-512 [preauth]
debug3: user_specific_delay: user specific delay 0.000ms [preauth]
debug3: ensure_minimum_time_since: elapsed 27.000ms, delaying 1.776ms (requested 7.194ms) [preauth]
debug3: send packet: type 52 [preauth]
debug3: mm_request_send entering: type 26 [preauth]
debug3: mm_send_keystate: Finished sending state [preauth]
debug3: ReadFileEx() ERROR:109, io:00DE59B0
debug3: read - no more data, io:00DE59B0
debug1: monitor_read_log: child log fd closed
debug3: get_user_token - i am running as user, returning process token
debug1: Not running as SYSTEM: skipping loading user profile
debug3: spawning "C:\\Program Files\\OpenSSH\\sshd.exe" -ddd -z
User child is on pid 3864
debug3: send_rexec_state: entering fd = 6 config len 184
debug3: ssh_msg_send: type 0
debug3: send_rexec_state: done
debug3: ssh_msg_send: type 0
debug3: ssh_msg_send: type 0
debug3: ssh_msg_send: type 0
debug3: ssh_msg_send: type 0
debug3: ssh_msg_send: type 0
debug3: mm_request_receive entering
Part of ssh log:
debug1: Authentication succeeded (publickey).
Authenticated to 127.0.0.1 ([127.0.0.1]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: network
debug1: ENABLE_VIRTUAL_TERMINAL_INPUT is supported. Reading the VTSequence from console
debug1: ENABLE_VIRTUAL_TERMINAL_PROCESSING is supported. Console supports the ansi parsing
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
shell request failed on channel 0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with ssh username@127.0.0.1 and compare it with the working ssh username@127.0.0.1 cmd command. Start with the reported sshd_config and the provided sshd and ssh logs; done means an interactive shell request succeeds without appending cmd.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- networking, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100