Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to setup permanent ssh-tunnel for port forwarding to machine behind firewall. The connection is between university network (very reliable) and commercial microwave metropolitan connection to a company (outages for a few minutes/several months max), and I want the connection to recover automatically after it fails.

I recall ther were some ssh wrappers featuring heartbeat failure detection, but I am curiously not able to google those up now. Which of them would you recommend?

share|improve this question
stick it in a for loop with a sleep command ? :-) – Sirex Sep 22 '11 at 11:36
@Sirex: Why sleep? Plus, this would not detect that data are not getting through. – eudoxos Sep 22 '11 at 11:49

Meanwhile I found autossh which looks like exactly what I need.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.