3
I use KDE (with ubuntu) and love using konsole as my terminal. I ssh a lot and every now and then (from various reasons) my connection dies and the sesson is stuck. I need to send a SIGHUP to the terminal so that the ssh session will end and I can use that window again. How do I do that with a keyboard shortcut (I hate being forced to use the mouse for Edit->Send Signal->Hangup).
If you have only one ssh connection it's enough to do a
pkill ssh
. If you have more than one you can search for the IP in thetop -c
... You may think to pipe thepgrep ssh
to build thetop -c
of only that processes... – Hastur – 2016-10-06T21:42:04.0432A useful trick in this situation is to type
~.
to tell ssh to drop the connection (ssh only looks for it at the beginning of a line so you might have to hit return first). – lemonsqueeze – 2016-10-07T00:40:11.960@lemonsqueeze - will your suggestion work on a stuck connection? I will try it next time and report? – DrorCohen – 2016-10-07T15:59:05.050
Yes, I use it all the time =) – lemonsqueeze – 2016-10-07T19:14:40.017
@lemonsqueeze: it worked. Thanks! if you'll write it as an answer I'll accept it – DrorCohen – 2016-10-07T20:10:46.203