Problem: CTRL-C seems to work to kill a process running in the foreground sometimes but not always. It also NEVER works to clear the current BASH command (this is the part that really bugs me).

This issue seems to only come up when I proxy one SSH connection over another. I'm using PuTTY and PLink. Unfortunately, I don't have a lot of choice in the toolset used to connect to my servers. I did manage to test this with a ProxyCommand in Linux SSH config and the result was the same.

Here's what I've got:

Client is a Windows workstation with PuTTY installed. ServerA is my "jumphost". Basically a bastion that I can reach from Client. ServerB is my destination. It can be reached by ServerA but not Client.

Putty on Client is configured with ServerA as a local proxy. The local proxy command is:

plink -agent -l %user %proxyhost -nc %host:%port

Everything works great for normal usage, however, if I have a partially typed bash command that I want to clear, CTRL-C doesn't work like you'd expect. In fact, it just does nothing. The same goes for trying to kill a running command. If the running process is set up to trap and do something with SIGTERM, that will happen, but if it's not, it appears that the SIGTERM fails to tell bash to kill the process.

If I SSH directly into another server, CTRL-C works as normal. However, when I SSH into a server over a plink proxy, it doesn't. It seems like maybe this is an issue with either plink or whatever passes the -nc tunnel on by ServerA however, I couldn't find any documentation on it.

I'm not sure what to do next to debug. Has anyone else run into this and solved it?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.