WeOnlyDo Support

Frequently Asked Question

How to connect to server with private key in wodSSH.NET?
Last Updated 12 years ago

Here is example how to connect to server with PrivateKey:

        ssh = New WeOnlyDo.Client.SSH
        key = New WeOnlyDo.Security.Cryptography.KeyManager
        key.Load("c:\RSAprivate.txt","weonlydo")

        ssh.Authentication = WeOnlyDo.Client.SSH.Authentications.PublicKey
        ssh.Hostname = "your_hostname"
        ssh.Login = "your_login"
        ssh.PrivateKey = key.PrivateKey(WeOnlyDo.Security.Cryptography.SSHKeyTypes.RSAKey)
        ssh.Connect()

PublicKey is part of PrivateKey. If you wish to connect to server with PrivateKey, server need to have your PublicKey.
You can generate and save PrivateKey and PublicKey with wodKeyManager.NET  component.
wodKeyManager.NET component is part of wodSSH.NET component.

Please Wait!

Please wait... it will take a second!