Unable to use autossh in background even with absolute path
- by Zagorax
I would love to set autossh to run at boot adding it to /etc/rc.local.
This command works:
autossh -i /root/.ssh/id_rsa -R 2522:localhost:22 user@address
But, if I add the -f option
autossh -f -i /root/.ssh/id_rsa -R 2522:localhost:22 user@address
The ssh session is not started.
As you can see, I'm using an absolute path for my identity file, so this seems to be a different problem from the one stated here: autossh in background does not work
From /var/log/syslog:
Oct 18 11:08:39 raspberrypi autossh[2417]: starting ssh (count 1)
Oct 18 11:08:39 raspberrypi autossh[2417]: ssh child pid is 2418
Oct 18 11:08:39 raspberrypi autossh[2417]: ssh exited with status 0; autossh exiting
I'm using it with debian wheezy on a raspberry pi, autossh version 1.4c.
Could it be that it's passing the -f option to ssh instead?