-
-
Notifications
You must be signed in to change notification settings - Fork 933
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
SSH Key Authentication Fails with macOS Ventura #1003
Comments
Update: I tried debugging SSH.NET and I'm seeing that the server returns an |
Update 2: I tried generating a key pair with another key format (ssh-keygen -t ecdsa -b 521), and it worked. So it looks like the issue is with RSA keys, however using the same RSA keys from a Windows command prompt works, so I don't think the issue is on the server side |
Update 3: Looks like the latest SSH.NET public version doesn't include support for ECDSA :/, but the latest develop does |
@mauroa Do you know if this is related to this: |
I'm having the same issue as you @vallgrenerik, can't get the pair to work. Everything is with the latest version, both windows vs and mac/xcode. I can't find the solution anywhere 😞 |
@giccifelipe |
@vallgrenerik
Any thoughts? |
@vallgrenerik I've managed to get working after doing a full reboot, shutting down both OSs. thanks. |
Just to confirm everyone concerns, the Pair To Mac error is directly related to this issue. However, VS is releasing a fix for it sooner than later. Please follow this ticket in order to keep updated: https://developercommunity.visualstudio.com/t/Impossible-to-connect-to-Remote-Mac-Host/10163760 |
This solution works for me
|
As the solution mentioned by @phu-mai-jemmic and @giccifelipe works for rsa keys, but do you know how to fix it for ecdsa keys? |
Version 2023.0.0 has been published https://www.nuget.org/packages/SSH.NET/2023.0.0 |
When I try to authenticate with an RSA SSH key from Windows into macOS Ventura, I get a
Permission denied (publickey).
error. However, If I run the same code against macOS Monterrey, it works correctly.I'm attaching a repro solution so you can give it a try.
Repro Steps:
Pre-requisites:
testKey.pub
file (included in the test project) into/Users/.<userName>/ssh/authorized_keys
in the MacAssign the corresponding values to the
host
anduserName
variables in theProgram.cs
file of the attached projectBuild and run the console app
Expected Results: the console should connect to the host with the given username and included private key (testKey)
Current Results: the console doesn't connect and show a
Permission denied (publickey).
error insteadNotes:
The attached SSH key pair has been generated using this command:
ssh-keygen -b 2048 -t rsa -m PEM -f "<filePath/>" -q -N "<passPhrase/>"
If I try to SSH connect to macOS Ventura with a Windows command prompt using the same key, it works correctly
SshNetVenturaRepro.zip
The text was updated successfully, but these errors were encountered: