'ssh -vvvT failing with "shell request failed on channel 0"

While trying to setup git SSH from my windows laptop, I see the below. How do I make it work? Currently, I see "shell request failed on channel 0"

Command Example:

ssh -vvvT git@<server> -p 7999
Sharing last few lines of the output below
debug1: channel 0: new [client-session]  
debug3: ssh_session2_open: channel_new: 0  
debug2: channel 0: send open  
debug3: send packet: type 90  
debug1: Entering interactive session.  
debug1: pledge: network  
debug3: receive packet: type 91  
debug2: channel_input_open_confirmation: channel 0: callback start  
debug2: fd 3 setting TCP_NODELAY  
debug3: ssh_packet_set_tos: set IP_TOS 0x20  
debug2: client_session2_setup: id 0  
debug2: channel 0: request shell confirm 1  
debug3: send packet: type 98  
debug2: channel_input_open_confirmation: channel 0: callback done  
debug2: channel 0: open confirm rwindow 2097152 rmax 32768  
debug3: receive packet: type 100  
debug2: channel_input_status_confirm: type 100 id 0  
shell request failed on channel 0

shell request failed on channel 0

Thank you



Solution 1:[1]

Since it depends on the server, you need to check if said server does listen on port 7999 for SSH connection.
7999 seems to be the standard SSH port for a BitBucket server, so check that hosting service log.

And you can use ssh -vvvT git@<server> -p 7999 /bin/bash -i to see if it generates any additional information.

Solution 2:[2]

Try to run the command as administrator :-)

Solution 3:[3]

I had the problem only with one user. The others could login. In this case just restarting the server solved the problem.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 VonC
Solution 2 ariwk
Solution 3 Martin Cup