Hacker News new | past | comments | ask | show | jobs | submit login

Worth noting that you need a newline before the ~ for it to work.

Another useful tip to know is how to set your own escape key.

    ssh -e ^ example.com
This will set the escape key to ^ instead of ~.

I had to use this recently to terminate an ssh connection that was initiated inside of a screen session on a machine I was sshed into from my laptop. Obviously, the generic ~. killed the first ssh session (on my machine), not the one in the screen. Connecting to the middle machine with ssh -e^ let me send ~. to the proper ssh session.




Instead of changing the escape, you can tap it one more time. So, to drop your 2nd (nested) connection: ~ ~ .




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: