So i got a script that i run through ssh like so:
ssh user@ip <<'EOF'export TERM=xterm#list of commands hereEOF
Problem is, in certain instance, i need to use Ctrl
+C
in the terminal, mainly when running application such as expect
or other that could use prompt or ncurse...
I know i could do something like this:
commandherePID=$!kill -INT $PID
But that wouldn't be right in this case, since i would either need to:
- use a function (prefer to only use a list of command like above, plus it wouldn't run locally but instead through ssh as far as i know)
- use this after each command.
How could i send Ctrl
+C
on the current terminal when running commands through ssh?