Last active
April 26, 2019 19:01
-
-
Save oskarsh/91b5577749e185d9d0f28a7853eb7d89 to your computer and use it in GitHub Desktop.
[run commands on ssh machine] runs a command on a device connected with ssh and gets output
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
#definde ssh | |
ssh_connection="root@189.232.123.XX" | |
password="admin" | |
sshpass -p $password ssh $ssh_connection #":command here:" | |
#ls command | |
ssh_connection="root@189.232.123.XX" | |
password="admin" | |
command="ls" | |
sshpass -p $password ssh $ssh_connection $command |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment