3

Suppose I do a SSH session chain within one single unique terminal window (RHEL6)

  1. open terminal on localMachine, SSH remote login to server1
  2. from server1, SSH remote login to server2
  3. from server2, SSH remote login to server3
  4. from server3, SSH remote login to localMachine

What happen to all these SSH sessions when I close the terminal window without typing all the sucessive exit commands ?

I suppose that only the first session is closed properly ? (localMachine-server1) Do all the other sessions remain until some inactivity timeout occur ?

Security is not an issue here. SSH is just used as a way to do remote logins.

1

All sessions will stop as the get signalled with SIGHUP. (Assuming you did nothing to prevent that signal from being processed).
There is no timeout for that, just a minimal delay as the signal causes the process to be stopped, which causes the SIGHUP on the next, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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