I have a local bash script that I would like to run on the second ssh server.
Here are the steps:
user$
- local machine
user$ ssh -A ssh
- logging into the first ssh
user@ssh01:~$ ssh server2
- logging into the second ssh
user@server2:~$
- logged into the second ssh server
I'm able to run the bash script on the first ssh server from my local machine with the below command:
user$ ssh -A ssh 'bash -s' < script
However, I don't know how to do it on the second ssh server.
when I try to do it from the first ssh it throws an error
user@ssh01:~$ ssh server2 'bash -s' < script
-bash: script: No such file or directory
Please advice