MacOS – autossh not behaving as expected

macossshterminal

I am trying to use autossh, like so:

autossh -f -i id_rsa -D 8080 user@myserver.com

However, on both an PPC Tiger eMac and a Mountain Lion MacBook Pro, I just get presented with the argument and environment variable list.

Both machines have autossh 1.4c installed. I am focused on getting it working on the Tiger machine; I only tried it on my Mountain Lion MBP to see if the issue was Tiger-specific.

Best Answer

I ran into this before and the issue for me was autossh expects a specified monitoring port (even though this is optional according to the usage stdout).

autossh -M 12345 -f -i id_rsa -D 8080 user@myserver.com

This similar command works for me against autossh 1.4c installed via homebrew on mountain lion.