3 ms·
I just use the gold old ^D in an empty prompt. https://en.wikipedia.org/wiki/End-of-Transmission_character#Meaning_in_Unix https://en.wikipedia.org/wiki/End-of
by ASalazarMX 7y ago
I just use the gold old ^D in an empty prompt.
https://en.wikipedia.org/wiki/End-of-Transmission_character#Meaning_in_Unix https://en.wikipedia.org/wiki/End-of-Transmission_character#...
- derefr 7y agoThat's how you gracefully shut down an SSH session, with the socket close initiated from the remote end (where the shell is running.) \n~. is for gracefully exiting a stuck/hung SSH session (e.g. one where the remote isn't responding to input) without force-killing the SSH client itself (which might do bad things to the process group it lives in.)
- CamperBob2 7y agoUnfortunately not all Telnet servers support that. Being the least interesting programmer on Hacker News, I don't always write code to handle Telnet-compatible ASCII input, but when I do, I always support ^D.