I am using the following command to setup an SSH tunnel to a remote server. I am using Ubuntu 15.10, and the remote server is running Ubuntu 14.04.3.
ssh -N -f -L localhost:7154:localhost:7154 username@server -p 9999
When executing the command, it asks me for the remote server password, and then it works just fine. However, I am wanting to use autossh so that I can keep the connection alive. I tried:
autossh -M 20000 -f -N -L localhost:7154:localhost:7154 username@server -p 9999
But I do not get a password prompt. The command just executes, and the tunnel isn't setup properly.
Any suggestions on how to get this to work?