Skip to content

Instantly share code, notes, and snippets.

@MaiLinhGroup
Last active February 4, 2019 22:28
Show Gist options
  • Save MaiLinhGroup/62b4f05bfca0927361897eb70a33d7e2 to your computer and use it in GitHub Desktop.
Save MaiLinhGroup/62b4f05bfca0927361897eb70a33d7e2 to your computer and use it in GitHub Desktop.
Scripts to first set up sd card with latest raspbian image, then assign static ip to, enable ssh (disabled by default since jessie) and finally copy ssh key for convenient login. Please make scripts executable with chmod and execute with sudo permission.
#!/bin/bash
echo "Insert sd card in pi and boot first:"
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
sudo arp-scan --interface=wlp4s0 --localnet
read -p "enter pi adress" pi
ssh-copy-id -i ~/.ssh/id_rsa.pub $pi
ssh $pi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment