【问题标题】:How to gain shell access when I'm locked out with "PTY allocation request failed on channel 0"当我因“通道 0 上的 PTY 分配请求失败”而被锁定时如何获得 shell 访问权限
【发布时间】:2011-11-22 04:48:35
【问题描述】:

我在远程 shell 上安装了 gitosis。它工作正常。但现在我无法登录交互式 shell。正如here 所说,似乎 gitosis 禁用了 tty。无论如何我可以把它找回来吗?我没有远程服务器的 root 访问权限。

【问题讨论】:

    标签: git ssh gitosis tty pty


    【解决方案1】:

    如果你让你的 ssh 客户端不请求一个 tty,你可能能够登录,可能是通过使用 -T 标志。

    例如

    ssh -T remotehost
    

    您将不会收到 shell 提示,正常的编辑键将无法使用,并且您将无法使用 vi、emacs 或更少的全屏程序,但您将能够运行简单的 shell 命令。

    我不知道如何重新启用 tty,抱歉。

    【讨论】:

    • 不,这给了我错误:gitosis.serve.main:Need SSH_ORIGINAL_COMMAND in environment.
    猜你喜欢
    • 2018-03-23
    • 1970-01-01
    • 2011-04-20
    • 2017-02-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-25
    相关资源
    最近更新 更多