Pseudo-terminal will not be allocated because stdin is not a terminal.和Unable to get valid context for root

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

通过这种方式执行command的时候:

ssh  user@server <<eeooff

command

eeooff

 会报error: Pseudo-terminal will not be allocated because stdin is not a terminal. 

 解决办法:

加参数:-T

ssh -T user@server <<eeooff

command

eeooff

Unable to get valid context for root

 selinux设置selinuxtype错误导致的问题。

posted @ 2023-01-05 17:09  CNY2022  阅读(914)  评论(0)    收藏  举报