Autossh dies after time

Posted by Justin on Server Fault See other posts from Server Fault or by Justin
Published on 2011-11-28T21:18:08Z Indexed on 2011/11/29 1:53 UTC
Read the original article Hit count: 660

Filed under:
|
|

My setup is

  • Ubuntu 10.04 on AWS
  • Autossh to create a tunnel for MySQL

The tunnel is automatically created using Upstart (/etc/init/autossh.conf):

respawn
console none

start on (local-filesystems and net-device-up IFACE=eth0)
stop on [!12345]

script

#user/IP Address redacted
exec autossh -M 20000 -o StrictHostKeyChecking=no -L 3306:127.0.0.1:3306 [email protected] 

end script

On boot the tunnel is created, works great. After some random idle time it dies. Any thoughts on how to keep it alive? I don't know what's killing autossh.

© Server Fault or respective owner

Related posts about ubuntu

Related posts about ssh