首页 > 解决方案 > ssh -vvvT 因“通道 0 上的 shell 请求失败”而失败

问题描述

在尝试从我的 Windows 笔记本电脑设置 git SSH 时,我看到以下内容。我如何使它工作?目前,我看到“通道 0 上的 shell 请求失败”

命令示例:

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

通道 0 上的 shell 请求失败

谢谢

标签: gitssh

解决方案


由于它取决于服务器,因此您需要检查该服务器是否确实在端口 7999 上侦听以进行 SSH 连接。
7999 似乎是BitBucket 服务器的标准 SSH 端口,因此请检查托管服务日志。

您可以使用ssh -vvvT git@<server> -p 7999 /bin/bash -i它来查看它是否会生成任何其他信息。


推荐阅读