I have a .NET 5 application running on a Debian server that I would like to attach a debugger to. The debugger I am trying to use is the one integrated into Visual Studio 2019.
I meet all the prerequisites listed in the documentation.
When setting up a new connection, a password connection works. However, none of my attempts with a private key result in a usable connection.
This private key works well when connecting via both PuTTY and the Windows OpenSSH binary outside of Visual Studio. Therefore, the underlying SSH tooling appears to be set up correctly.
Attempts:
Unprotected OpenSSH-compatible private key:
Results in a
%LocalAppData%\devenv_exe_linux_connection_error_133651_090121.log
containing just the textBad Data.
Also says
Passphrase invalid
on the empty passphrase boxPassword-protected OpenSSH-compatible private key:
Exactly the same result as the unprotected key.
Bad Data.
andPassphrase invalid
.Unprotected PuTTY-compatible private key:
Host/port textboxes report
Failed to negotiate host key algorithm. Only RSA and DSA host keys are supported.
(server has ecdsa/ed25519/rsa host keys available, also the ecdsa host key was accepted by password auth)Private key file textbox reports
An error occurred connecting using private key ...
Empty passphrase textbox reports
Passphrase invalid
Password-protected PuTTY-compatible private key:
Exactly the same result as the unprotected key.
Failed to negotiate host key algorithm.
/An error occurred connecting using private key
/Passphrase invalid
.
At this point it's unclear what key format Visual Studio supports, as I have tried all the common ones.
Ideally I'd like to use the key I have stored in Pageant-compatible KeeAgent, also exposed via an OpenSSH-compatible socket. But I'll settle for getting a private key via file working.
Versions:
- Visual Studio 2019 Professional, Version 16.11.2
- dotnet SDK 5.0.101 on Debian Buster