Hacker News new | ask | show | jobs
by hsjqllzlfkf 1161 days ago
Why is this better than CTRL-C?
3 comments

Generally ssh will just forward signals (SIGINT, SIGQUIT) to the remote host. If that side is not responsive, you can hit Ctrl+C all you want, but it won't do anything.
It's client-side, so works even if the remote system is totally hung and did not clearly disconnect.

For example, running `systemctl suspend` will not terminate active SSH connections before putting the destination machine into a sleep state, and thus Ctrl+C (which isn't processed by SSH) will do nothing until the remote host is woken up by some mechanism.

Control-C won't stop a connection that's already been established. It only aborts if it hasn't completed the handshake yet.

Otherwise how could you send a control-C without any special guard sequence while ssh-ing?