I have an Expect script which spawn a screen session to read an embedded board console and give respond automatically. I have no issue while executing the Expect script locally in the host.
But when I wish to execute the script from another machine to that host via ssh, for example
ssh email@example.com './flash-the-board.sh', I will get the prompt
Please set a terminal type
I have try to set
TERM=vt100 in the SSH command before running the bash script, end up i got the error
expect: read eof screen is terminating
Anyone know how to fix this? Thanks