Skip to content

Instantly share code, notes, and snippets.

@carlosmcevilly
Created February 28, 2020 06:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlosmcevilly/c23ffad1dcfb7a93022b7c85b13d9143 to your computer and use it in GitHub Desktop.
Save carlosmcevilly/c23ffad1dcfb7a93022b7c85b13d9143 to your computer and use it in GitHub Desktop.
bash ssh and scp convenience functions for use on the command line
# 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