Skip to content

Instantly share code, notes, and snippets.

@zankich
Last active December 24, 2015 13:29
Show Gist options
  • Select an option

  • Save zankich/6805652 to your computer and use it in GitHub Desktop.

Select an option

Save zankich/6805652 to your computer and use it in GitHub Desktop.
# run this script when your beaglebone black is connected to your computer through the usb port in order to ssh
# the root password is 'artoo'
#!/bin/bash
bbb="192.168.15.1"
host="192.168.15.2"
sudo ifconfig usb0 $host
# Configure IP forwarding on HOST
sudo iptables -A POSTROUTING -t nat -j MASQUERADE
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward > /dev/null
ssh root@$bbb
## Add this line to your /etc/network/interfaces and then restart your computer
iface usb0 inet static
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment