Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

December 2024 AGAIN: Ctrl-C interrupts the whole ssh session while catching by in interactive mode #83 #248

Open
annh9b opened this issue Dec 16, 2024 · 8 comments

Comments

@annh9b
Copy link

annh9b commented Dec 16, 2024

As not-a-user wrote in original issue #83 (I can't re-open it):

"
On a fresh msys2 install (openssh 8.9p1-3, msys2-runtime 3.3.5-3) this problem shows up when
using a ProxyCommand and the actual proxy command is a plain Windows (non-msys) program. With a direct ssh into the same box CTRL-C works as expected.
"

I confirm that behavior. Moreover I use an msys2 program, mingw-w64-x86_64-connect, and the problem with Ctrl-C appears ONLY while using "ProxyCommand connect -5 -S 127.0.0.1:9150 %h %p" in the ssh config file.

@dscho
Copy link
Collaborator

dscho commented Dec 16, 2024

msys2-runtime 3.3.5-3

Are you really, really sure that this is up to date?

$ pacman -Q msys2-runtime
msys2-runtime 3.5.4-8

@annh9b
Copy link
Author

annh9b commented Dec 17, 2024

Mine:

$ pacman -Suy
:: Synchronizing package databases...
clangarm64 is up to date
mingw32 is up to date
mingw64 is up to date
ucrt64 is up to date
clang32 is up to date
clang64 is up to date
msys is up to date
:: Starting core system upgrade...
there is nothing to do
:: Starting full system upgrade...
there is nothing to do

$ pacman -Q msys2-runtime
msys2-runtime 3.5.3-4

What's wrong? Without "ProxyCommand connect -5 -S 127.0.0.1:9150 %h %p" in C:\msys64\etc\ssh\ssh_config: all works fine. With: Ctrl+C breaks the whole ssh session down to MinGW64 command prompt.

@dscho
Copy link
Collaborator

dscho commented Dec 17, 2024

$ pacman -Suy

Maybe you need pacman -Syyu. That's necessary e.g. when you copied the files from elsewhere and the timestamps of the files do not reflect when they were last updated, but when they were copied.

@annh9b
Copy link
Author

annh9b commented Dec 17, 2024

$ pacman -Syyu
:: Synchronizing package databases...
clangarm64 428.8 KiB 1336 KiB/s 00:00 [#######################################################] 100%
mingw32 203.7 KiB 659 KiB/s 00:00 [#######################################################] 100%
mingw64 452.0 KiB 1205 KiB/s 00:00 [#######################################################] 100%
ucrt64 481.9 KiB 1530 KiB/s 00:00 [#######################################################] 100%
clang32 14.0 KiB 46.4 KiB/s 00:00 [#######################################################] 100%
clang64 468.5 KiB 473 KiB/s 00:01 [#######################################################] 100%
msys 218.5 KiB 263 KiB/s 00:01 [#######################################################] 100%
:: Starting core system upgrade...
there is nothing to do
:: Starting full system upgrade...
there is nothing to do

$ pacman -Q msys2-runtime
msys2-runtime 3.5.3-4

@annh9b
Copy link
Author

annh9b commented Dec 17, 2024

I suspect, the "connect" utility somehow invokes a terminal, and Ctrl-C destroys it, because new terminal's default Ctrl-C action is terminate a program.

@dscho
Copy link
Collaborator

dscho commented Dec 17, 2024

Your setup must be broken somehow, as a newer msys2-runtime version is current: https://packages.msys2.org/base/msys2-runtime

You are unlikely to benefit from any fixes we can make unless you fix your system to be able to upgrade to the newest version.

Maybe you have an incorrect /etc/pacman.conf or other funny business is going on there. Whatever it is, it needs to be addressed before it makes sense to analyze any further: your msys2-runtime is missing a lot of patches.

@annh9b
Copy link
Author

annh9b commented Dec 18, 2024

You were right, now all fixed:

$ pacman -Q msys2-runtime
msys2-runtime 3.5.4-8

I even re-installed:

$ pacman -R mingw-w64-x86_64-connect
$ pacman -S mingw-w64-x86_64-connect

exactly the same behavior: all works fine until C:\msys64\etc\ssh\ssh_config contains "ProxyCommand connect -5 -S 127.0.0.1:9150 %h %p"

@jpfleischer
Copy link

jpfleischer commented Dec 28, 2024

Ctrl + C also breaks for me too since my proxycommand uses cloudflared access
My msys2 version is 3.5.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants