Created
July 29, 2022 15:34
-
-
Save danyanya/4f9fca3c348dd18f7cdd21421d635ad5 to your computer and use it in GitHub Desktop.
magic ssh restarter 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
ADDR=$1 | |
USER=$2 | |
PASS=$3 | |
KEYS='-q -o ServerAliveInterval=2 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' | |
SSHPASS="sshpass -p $PASS ssh $KEYS $USER@$ADDR" | |
$SSHPASS cpeagent restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment