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
By posting your answer, you agree to the
terms of service.
7 months ago
2 months ago