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.

When I'm using SSH to connect to an Ubuntu machine and it freezes, I'd just close PuTTY and re-login.

Is there a better way to handle errors like this? (like Ctrl+Alt+Del in Windows)

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

The best way to work via SSH is to run a terminal multiplexer like screen. SSH in like normal, launch a screen session. If you drop your connection just SSH back in and reattach to the already running session. Screen also allows you to share a session, split your screen multiple times and detach a session and reconnect, with your programs still as you left them.

If your SSH process is locking up, or something else, then you have a larger problem then I am addressing.

Here is some more info on using screen. Wiki.

share|improve this answer
add comment

Justin S makes a great recommendation. As an alternative you might want to consider trying out autossh. It automatically reconnects when an SSH tunnel breaks.

share|improve this answer
add comment

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.