I have a script on my local machine,
script.sh. I want to run it on a remote server that is only accessible by multiple ssh.
ls ls ls
user@localhost:~/$ ssh -At host1 ssh -At host2 "bash -s" -- < ./script.sh
but the output was split onto multiple lines:
user@host2:~/$ ls examples.desktop user@host2:~/$ ls examples.desktop user@host2:~/$ ls
I also would like this to execute without putting me in a terminal on the remote machine.
How can I get the script to execute as a single command?