I have a batch file
#content of batch file
@echo off
plink.exe -ssh user@IP.address -m C:\Users\My\Documents\command_test.txt -i C:\Users\My\Desktop\PUTTYKEY.ppk
which connects to a remote ubuntu host using plink.exe and runs the following command to set off the script
#content of command_test.txt
/home/user/script.sh
The script requires user input to select files from a second remote host using zenity file selection and an OpenSSH connection
#code snippet from script.sh
ssh -X Remote_vm_user@Remote2.IP.address <<EOF
zenity --title "please select location of data" --file-selection --directory > directory_selected.tmp
echo "========================="
echo "user selected"
cat directory_selected.tmp
echo "========================="
exit
EOF
This works when executing the script directly when connected using PuTTy
However, when executed using the batch file it returns the error;
Pseudo-terminal will not be allocated because stdin is not a terminal.
I have tried using a variety of options to force it as suggested How to deal with "Pseudo-terminal will not be allocated because stdin is not a terminal."
-t
and -tt
and -T
and -t -t
These don't work, no errors are displayed, it just eventually times out
very new to stack overflow so apologies if poor question, suggest edits and I'll amend immediately