The Code is as follows:
Ssh-Q [email protected] <EOF Ping-C 3 localhosteof
The following message is displayed:
Pseudo-terminal will not be allocated because stdin is not a terminal.
Google, someone suggested adding the-T (ssh-T-Q [email protected]) parameter to avoid this situation. As described in this article:
Http://buralin.iteye.com/blog/2035691
Parameter description:
-T disable pseudo-tty allocation. -t force pseudo-tty allocation. this can be used to execute arbitrary screen-based programs on a remote machine, which can be very useful, e.g. when implementing menu services. multiple-T options force tty allocation, even if SSH has no local TTY.
Based on the above, we can see that when you call a script that uses SSH automation, the current role is assigned a tty after logging on to the remote through SSH, but an error is reported because the current logon mode is not the local mode.
So use-t to disable this behavior.
Inexplicable errors caused by SSH Automation