Now I just need to figure out how to start it on reboot, but that
is something I've been meaning to learn, anyway, so I don't mind.
I hope you guys will bear with me just a little more... I have spent
the day trying to figure out how to create an rc script for autossh.
Very cool, and not as hard as I'd anticipated. It is attached below.
The script works perfectly *iff* I run it from the command line as a
non-root user, like so:
However, it does NOT work when executed by root. Instead, I get the
following error message in /var/log/messages
messages:Oct 21 19:01:38 on autossh: ssh exited prematurely
with status 255; autossh exiting
So (my understanding), autossh is starting, and tries to create the
tunnel, but the tunnel creation fails with the unhelpful 255 error
But only when executed by root. That's the puzzling part.
I don't allow root logins on this server, but don't see how that
could cause this problem....
I'm stumped. Any hints, much appreciated.
# PROVIDE: autossh
# REQUIRE: LOGIN
# KEYWORD: shutdown
command_args="-M 20000 -fNg -L 33006:127.0.0.1:3306 [EMAIL PROTECTED]"
#AUTOSSH_PIDFILE="$pidfile"; export AUTOSSH_PIDFILE
echo "started autossh"
firstname.lastname@example.org mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"