NOTE
FROM: https://serverfault.com/questions/625641/how-can-i-run-arbitrarily-complex-command-using-sudo-over-ssh
Pass a complex script to be executed over SSH.
ssh -tt@ "echo `base64 test.sh` | base64 -d | sudo bash"
The key is to base64 encode locally and decode it remotely in order to execute it correctly.
FROM: https://serverfault.com/questions/625641/how-can-i-run-arbitrarily-complex-command-using-sudo-over-ssh
Pass a complex script to be executed over SSH.
ssh -tt
The key is to base64 encode locally and decode it remotely in order to execute it correctly.
No comments:
Post a Comment