The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Quit Nested SSH Sessions: use one more ~ for each nesting

Posted by jpluimers on 2024/11/18

Never too old to learn:

  • [Wayback/Archive.is] Quit Nested SSH Sessions

    works with ssh as well but is much simpler: press as many ~ as level of nest before . (by default, ~ is the escape character while . is to terminate ssh).

  • [Wayback/Archive.is] How can I break out of ssh when it locks? – Ask Ubuntu

    Notice that because hitting ~~ causes ssh to send the ~ instead of intercepting it, you can address N nested ssh connections by hitting ~ N times. (This only applies to ~s that directly follow an Enter.) That is to say that Enter~~~~~. terminates an ssh session 5 layers deep and keeps the other 4 intact.

So this is basically an extension of my 2017 blog post OpenSSH Escape Sequences (aka Kill Dead SSH Sessions) – The Lone Sysadmin (:

–jeroen

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.