When I'm connection to a remote server via ssh inside a Terminal window, and I put the computer to sleep, when I come back the connection is of course interrupted. The problem is there seems to be no way to resurrect the window and its associated local bash prompt. All I really care about is re-using the Terminal window. I don't want to have to do command+N which opens a tiny window, and have to resize it, and position it on the screen, etc. Shouldn't there be some way to use the same window and local shell? I would kind of expect a sleep action to cause the ssh program to drop back to a local bash prompt, so I don't understand why the window seems to be completely dead.
Tell me more
×
Super User is a question and answer site for
computer enthusiasts and power users. It's 100% free, no registration required.
|
Press Enter ~ . to terminate a SSH session. (~ is |
|||
|
|
|
What happens if you use Ctrl-C? The other option would be to create a new tab, rather than a new window by using Command-T instead of Command-N. And another option on top of that would be to open a new tab, use the killall command to force SSH to end, and then close the new tab. |
|||||
|
|
wait a few minutes and you'll get the prompt back. If you don't want to wait, you can copy and paste the screen to a text file, open a new terminal tab/window and cat the file. (You'll lose the colours though) |
|||
|
|