I have a Beaglebone Black system on our boat in France which is connected to the internet via a WiFi hotspot. To allow me to connect to it with ssh it is set up to create ssh tunnels to a couple of places where I have logins.
I used to run something similar on an ancient eeePc, on that system it remained permanently accessible but on the Beaglebone Black it only allows me to connect some of the time.
I have to repeatedly try to connect over a few minutes to get connected:-
halon$ ssh -p 51234 localhost ssh_exchange_identification: Connection closed by remote host halon$ ssh -p 51234 localhost ssh: connect to host localhost port 51234: Connection refused halon$ while true; do ssh -p 51234 localhost; sleep 60; done ssh: connect to host localhost port 51234: Connection refused ssh: connect to host localhost port 51234: Connection refused chris@localhost's password:
It's not that the ssh processes on the BBB are dying, they've been running for several days:-
chris@beaglebone$ ps -ef | grep ssh root 968 1 0 May04 ? 00:00:00 /usr/sbin/sshd -D root 1262 1 0 May04 ? 00:00:01 /usr/lib/autossh/autossh -N -R 51234:localhost:22 -l chris cheddar.halon.org.uk root 1263 1 0 May04 ? 00:00:01 /usr/lib/autossh/autossh -N -R 51235:localhost:22 -l isbdnet3 shell.gridhost.co.uk root 1264 1 0 May04 ? 00:00:01 /usr/lib/autossh/autossh -N -R 51236:localhost:22 -l timetode shell.gridhost.co.uk root 3288 1264 0 11:13 ? 00:00:00 /usr/bin/ssh -L 34227:127.0.0.1:34227 -R 34227:127.0.0.1:34228 -N -R 51236:localhost:22 -l timetode shell.gridhost.co.uk root 9614 1262 0 18:17 ? 00:00:00 /usr/bin/ssh -L 34448:127.0.0.1:34448 -R 34448:127.0.0.1:34449 -N -R 51234:localhost:22 -l chris cheddar.halon.org.uk root 9727 968 3 18:20 ? 00:00:00 sshd: chris [priv] chris 9752 9727 0 18:20 ? 00:00:00 sshd: chris@pts/0 root 18064 1263 0 May08 ? 00:00:01 /usr/bin/ssh -L 61875:127.0.0.1:61875 -R 61875:127.0.0.1:61876 -N -R 51235:localhost:22 -l isbdnet3 shell.gridhost.co.uk
So what could be making the tunnels work some of the time but not all of the time?