Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 have to SSH to a computer on my network and stay connected. However, my network shuts down from midnight to 7:00 am everyday. What i want is that I be able to auto-reconnect to the computer once the network comes back at 7:00 am. Cron solutions are no good. I am using Ubuntu 10.04.

share|improve this question
up vote 2 down vote accepted

Use autossh. It will spew thousands of retry errors from Midnight to 7:00am, but it will reconnect you eventually.

share|improve this answer
Thanks. Even though I haven't tested it yet, i guess it will work. – tapan Jun 20 '10 at 12:17

I can't think of a mechanism that would let an SSH session dally for 7 hours, but GNU Screen Session Management could probably help with disconnecting and reattaching to a shell.

share|improve this answer
I'm sorry but this didn't help. I think I couldn't exactly figure this out. – tapan Jun 13 '10 at 20:53

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.