Created
February 28, 2020 06:16
-
-
Save carlosmcevilly/c23ffad1dcfb7a93022b7c85b13d9143 to your computer and use it in GitHub Desktop.
bash ssh and scp convenience functions for use on the command line
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
# change userid, remote ip address and name of keyfile as needed | |
# rasberry pi | |
pi-ssh () { ssh -l myuserid -i ~/.ssh/id_rasberrypi 192.168.3.141; } | |
pi-put () { scp -i ~/.ssh/id_rasberrypi $1 myuserid@192.168.3.141:/home/myuserid/$2; } | |
pi-get () { scp -i ~/.ssh/id_rasberrypi myuserid@192.168.3.141:/home/myuserid/$1 .; } | |
# beaglebone | |
bb-ssh () { ssh -l myuserid -i ~/.ssh/id_beaglebone 192.168.1.23; } | |
bb-put () { scp -i ~/.ssh/id_beaglebone $1 myuserid@192.168.1.23:/home/myuserid/$2; } | |
bb-get () { scp -i ~/.ssh/id_beaglebone myuserid@192.168.1.23:/home/myuserid/$1 .; } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment