Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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

 
discard

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.