Reputation: 7451
As part of an intricate BASH script, I'd like to execute a command on a remote system from within the script itself.
Right now, I run the script which tailors files for the remote system and uploads them, then through a ssh login I execute a single command.
So for full marks:
Upvotes: 5
Views: 3999
Reputation: 7797
Following Tim Post's answer:
Setup public keys and then you can do the following:
#!/bin/bash
ssh user@host "chmod 755 /go && /go"
Upvotes: 4