How can I do something like this with one ssh command:
echo << EOF echo "Choose a file:" * read f rm -r "$f" EOF | ssh user@host
I can use the
-tt (yes two t's) with ssh to make ssh read from stdin, however it doesn't seem to allow
read to work.
Is there a way of doing this?