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 Email and Password
3 years ago
2 years ago