Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

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

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
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 '13 at 4:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .