4

The question should hopefully sum things up, but essentially, I'm in a bunch of SSH sessions, some of which have additional SSH sessions to other hosts. Are there any negative impacts to simply closing the entire terminal, rather than typing exit half a dozen times until I am back at my original command prompt.

My Environment:

OS: OSX 10.8.4
Terminal: iTerm2
Shell: zsh

1 Answer 1

1

I'm pretty sure there are.

Think about it - if you type exit thirty thousand times, you are closing each ssh session one at a time. That's good - all the sessions that originated from your machine get closed.

Now think about what happens when you just kill the terminal window on your machine. Your SSH session might get killed, but is the machine that you ssh'ed into from another machine smart enough to kill its SSH session? And the one it's hooked to? And the one after that?

As you can see, it doesn't take much to go wrong and you have a problem on your hands. Namely, a bunch of unused SSH sessions. Enough of those and you will probably have to restart some machines.

Just type exit. Over and over and over.

1
  • Yeah that's a good point. I thought the client might be intelligent enough to submit it through the chain of ssh sessions but then I doubt it would be likely between multiple other hosts.
    – speedRS
    Aug 1, 2013 at 4:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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