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.

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
add comment

1 Answer

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
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.