首页 > 代码库 > Pseudo-terminal will not be allocated because stdin is not a terminal.

Pseudo-terminal will not be allocated because stdin is not a terminal.

打算在shell里写脚本调用ssh,突然来个报错:

Pseudo-terminal will not be allocated because stdin is not a terminal.

中文解释:伪终端不会分配因为stdin不是终端。



查看ssh命令帮助得以解决:

-q    Quiet mode.  Causes most warning and diagnostic messages to be suppressed.

-T      Disable pseudo-tty allocation.

技术分享

然后ssh -Tq  用户@主机 -p 端口 即可。

本文出自 “永不放弃! 任志远” 博客,请务必保留此出处http://renzhiyuan.blog.51cto.com/10433137/1880329

Pseudo-terminal will not be allocated because stdin is not a terminal.