Created
July 26, 2020 19:52
-
-
Save anujkaushal/3214066b1604f0c5664bdf881d678395 to your computer and use it in GitHub Desktop.
How to open server bash inside a local shell script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
var1="important-value" | |
echo "SEVER BASH - stats here" | |
ssh -i ./key.pem user@example.com <<-SSHBASH | |
echo "Successfully connected to example.com" | |
ls -l ./public_html/index.html | |
echo "Echo Var1 Value: $var1" | |
SSHBASH | |
echo "Successfully disconnected from example.com" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment