Skip to content

Instantly share code, notes, and snippets.

@GiorgioAresu
Created July 1, 2019 23:10
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 GiorgioAresu/b909593860f378d308cedbcfeda59971 to your computer and use it in GitHub Desktop.
Save GiorgioAresu/b909593860f378d308cedbcfeda59971 to your computer and use it in GitHub Desktop.
Connect to Raspberry Pi 0 OTG Ubuntu
#!/bin/sh
NET=`ip addr show | grep UNKNOWN | grep -v lo: | awk -F ': ' '{print $2}'`
OWN_IP=`echo $1 | awk -F '[ \t]+|/' '{print $4}'`
PI_IP=`ping6 -I $NET ff02::1 | grep DUP\! -m1 | awk -F '\ |: ' '{print $4}'`
ssh -6 pi@${PI_IP}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment