I want to run a local shell script on a remote computer with SSH. How can I do this?
ssh user@remotehost "bash -s" < local_script.sh
-s makes bash read from standard input.
ssh user@remotehost < local_script.sh
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
1 year ago
9 months ago