Generate RSA keypairs with passphrase for SSH.NET
I need to create a key pair which can be used by the renci.sshnet library to connect to a ssh server (after I would copy the public key). I tried using https://github.com/ShawInnes/SshKeyGenerator, but this library doesn't seem to support passphrases. I also don't want to store the keys in files.
I also couldn't get https://github.com/darinkes/SshNet.Keygen to work, which would support passphrases.
18 Replies
Where are you gonna store the keys, if not in files?
In a variable
that seems awfully temporary
are you gonna be re-generating keys every time the app starts?
I'm trying to build a program that connects to a ssh server, swaps out a key (~/.ssh/authorized_keys), then stores the key encrypted in a database
For that, it has to generate a new key pair
this seems fine.. SshNet.Keygen. Its only in pre-release and requires the 2022 version of SshNet, but it seems to work
thanks, but where can I find the 2022 version of Ssh.net?
Just install the keygen and it gives you sshnet transatively
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
Because the keygen package internally depends on it
And seems a little so-so maintained
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
That screenshot shows sshnet itself, not sshnet.keygen
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
I'm trying to use a newer version ssh.net but I get this error. It would be important that I can use the newer version of ssh.net
Is it somehow possible that I can use both versions? The old version for sshnet.keygen and the new version for connections?
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
but then my other code doesn't work anymore
Pobiega
Quoted by
<@689473681302224947> from #Generate RSA keypairs with passphrase for SSH.NET (click here)
React with ❌ to remove this embed.
Unknown User•9mo ago
Message Not Public
Sign In & Join Server To View
nvm, seems to work now xD
Thank you for the help guys