I kinda expected people to look at what the script was doing so I didn't 
not explain every aspect of how it works.
Looking at the setup-bbb-ipforwarding script you see the line which starts 
with scp? that is like "cp" and it copies files so looking at it you should 
see that it is trying to copy the setup-bbb-ipforwarding-onBBB to the BBB. 
and there is no path for that file specified so it MUST be in the same 
directory you are running the host script from.

after the "scp" command you should see the line beginning with "ssh". that 
is running a secure shell to the BBB and tries to run the "....-onBBB" 
script. So if it is not there it can't execute it.

If you look in the ....-onBBB script you will see it is just a list of the 
2 things which set the route to the host computer and set the name server 
in /etc/resolv.conf.

Doug

On Wednesday, February 5, 2014 6:20:31 PM UTC-8, hacktorious wrote:
>
> Running your script produces the following errors:
>
> Host 'beaglebone.local' is not in the trusted hosts file.
> (fingerprint md5 f2:40:93:ec:3d:f2:20:ee:53:ae:55:99:e0:f2:f9:5e)
> Do you want to continue connecting? (y/n) y
> root@beaglebone.local's password: 
> setup-bbb-ipforwarding-onBBB: No such file or directory
> Warning: Permanently added the RSA host key for IP address '192.168.7.2' 
> to the list of known hosts.
> root@beaglebone.local's password: 
> sh: /tmp/setup-bbb-ipforwarding-onBBB: No such file or directory
> iptables v1.4.15: can't initialize iptables table `nat': Table does not 
> exist (do you need to insmod?)
> Perhaps iptables or your kernel needs to be upgraded.
>
> On Wednesday, February 5, 2014 3:55:11 PM UTC-5, doog wrote:
>>
>> I thought this a handy thing to do so I put the BBB side commands in an 
>> executable script and then created another script for the host side. The 
>> host side copies(via scp) the BBB script to the BBB and then executes 
>> it(via ssh) and then sets up the host(Linux). Run the host side with sudo 
>> or as root.
>>
>> Doug
>>
>> --BBB side: file name: setup-bbb-ipforwarding-onBBB
>>
>> #!/bin/bash
>> #from: 
>> http://www.crashcourse.ca/wiki/index.php/BBB_networking_in_tethered_mode
>>
>> # enables networking of the BBB over the usb network if
>> # this along with a few commands on the host/server side enable 
>> ipforwarding over the usb networking
>>
>> echo "route add default gw 192.168.7.1"
>> /sbin/route add default gw 192.168.7.1
>> echo "echo nameserver 8.8.8.8 > /etc/resolv.conf" 
>> echo "nameserver 8.8.8.8" > /etc/resolv.conf 
>>
>> --HOST side: file name: setup-bbb-ipforwarding
>>
>> #!/bin/bash
>> #from: 
>> http://www.crashcourse.ca/wiki/index.php/BBB_networking_in_tethered_mode
>>
>> # this will enable a BBB connected over usb network to gain internet 
>> access through this host computer.
>> # there is a similarly named file which must be copied to the BBB and run 
>> as the first 2 commands will attempt to do.
>>
>> scp setup-bbb-ipforwarding-onBBB root@beaglebone.local:/tmp/
>> ssh root@beaglebone.local /tmp/setup-bbb-ipforwarding-onBBB
>>
>> echo 1 > /proc/sys/net/ipv4/ip_forward 
>> iptables -A POSTROUTING -t nat -j MASQUERADE
>>
>>
>>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to