PTY allocation request failed on channel 0 是什么意思?


描述

在测试ssh与git的连接状况时出现

➜  ~  ssh git@github.com
PTY allocation request failed on channel 0
Hi miaoyin! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.

提示含义

PTY allocation request failed on channel 0

上面表示分配PTY失败。PTY指伪终端. 它可以让用户,像在本地shell终端操作一样的操作远程机器. 可以加上参数-T,表示仅建立数据通道.

设置参数-T

➜  ~ ssh -T git@github.com
Hi miaoyin! You've successfully authenticated, but GitHub does not provide shell access.

某些情况下-T很有用,如将ssh作为数据通道.



上篇: WARN:oejsh.ContextHandler:Aliased resource 错误 下篇: jetty-maven-plugin静态文件保存不了