-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Bundled SSH unable to negotiate modern ciphers? #1723
Comments
Are you sure that the bundled |
As sure as I can be. You can see from the OP that in my testing I'm using the full path to the bundled ssh.exe. I'm seeing the same error messages in sourcetree as I see from the cmd terminal. Also, when I tried switching out the ssh.exe binary bundled with git with one from cygwin I get a different error in sourcetree. |
Okay. Have you tried with |
Good idea. Here's what I get when I try to connect with verbosity turned all the way up. I don't really understand SSH well enough to know if there's anything useful in here:
|
I can reproduce this:
It is also curious that while |
The problem goes away for me if I comment out this line in
|
@drizzd you are genius! Commenting that line solves the problem for me too. I didn't even think that there would be a hard coded cipher list in the ssh_config file. |
Git-for-Windows re-enables CBC ciphers by uncommenting the Ciphers option in ssh_config and appending ",aes256-cbc,aes192-cbc" [*1*]. This inadvertently disables GCM ciphers and Chacha20 [*2*]. Instead of relying on the contents of the default ssh_config, a better solution would be an option to retrieve a list of default ciphers from ssh. Currently, it is only possible to print a list of available ciphers using `ssh -Q cipher`, but this includes ciphers which are not offered by default. [*1*] git-for-windows/build-extra@b46fba6 [*2*] git-for-windows/git#1723
These are offered by ssh by default, but they are not included in the default list of Ciphers in ssh_config. Closes git-for-windows/git#1723.
These are offered by ssh by default, but they are not included in the default list of Ciphers in ssh_config. Instead of setting the entire list of ciphers, selectively re-enable the CBC ciphers using the "Cipher +somecipher" notation. Closes git-for-windows/git#1723.
Instead of setting the entire list of ciphers in git-extra, selectively re-enable the CBC ciphers using the "Cipher +somecipher" notation. Closes git-for-windows/git#1723.
Instead of setting the entire list of ciphers in git-extra, selectively re-enable the CBC ciphers using the "Cipher +somecipher" notation. Closes git-for-windows/git#1723. Signed-off-by: Clemens Buchacher <[email protected]>
Instead of setting the entire list of ciphers in git-extra, selectively re-enable the CBC ciphers using the "Cipher +somecipher" notation. Closes git-for-windows/git#1723. Signed-off-by: Clemens Buchacher <[email protected]>
These are offered by ssh by default, but they are not included in the default list of Ciphers in ssh_config. Instead of setting the entire list of ciphers, selectively re-enable the CBC ciphers using the "Cipher +somecipher" notation. Closes git-for-windows/git#1723. Signed-off-by: Clemens Buchacher <[email protected]>
These are offered by ssh by default, but they are not included in the default list of Ciphers in ssh_config. Instead of setting the entire list of ciphers, selectively re-enable the CBC ciphers using the "Cipher +somecipher" notation. Closes git-for-windows/git#1723. Signed-off-by: Clemens Buchacher <[email protected]>
Setup
defaults?
to the issue you're seeing?
I'm trying to use Git with SourceTree which does not respect the GIT_SSH environment variable. So, I'm forced to use the ssh client bundled with Git. See this post.
This issue appeared after I updated Git recently. I was able to connect to the same server without issue before. Sorry, I don't have the old version number I was using handy.
Details
CMD
Minimal, Complete, and Verifiable example
this will help us understand the issue.
SSH should connect to the server and ask for my credentials.
SSH fails to connect with a "No matching cipher found" error. The server is configured to only use a limited set of modern ciphers. I don't have trouble connecting to this same server with other OpenSSH clients on Windows (Cygwin) or Linux. But, when I try to use the client bundled with Git as shown above it fails to connect with:
But, when I run:
"C:\Program Files\Git\usr\bin\ssh.exe" -Q cipher
I get:
So, the bundled SSH at least advertises support for the ciphers the server is offering leaving me totally stumped? Is anyone else seeing this behavior?
URL to that repository to help us with testing?
This is a private repo that I can't share the URL of publicly. But, if someone wants to talk to me directly, I can share it for testing.
The text was updated successfully, but these errors were encountered: