Re: Example of logging in w/ a public key (General questions)
a little more info
I found the second signature for LoadKey. Good thing it wasnt a snake. I am now correctly loading the keys w/ a passphrase.
However, I am still not getting connected. The Terminal PubKey CS Sample project gives the following output when I try to connect.
CONNECTING
DISCONNECTED
ERROR: Authentication with the server failed.
I have sent two sets of keys (pvt and pub) to the server admin. one w/ a passphrase and one w/o. He says he has the accounts set up and he can get in w/ no problem. I get the same results w/ both keys.
AAAAAARRRRGGGGHHHHHh.
------------------------------------------------------------
here is the code, (it should look pretty familiar). I have triple checked the contents of the textboxes.
Ssh1.Protocol = WeOnlyDo.Client.SSH.SupportedProtocols.SSH2;
Ssh1.Timeout = 30;
Ssh1.Port = 22;
WeOnlyDo.Security.Cryptography.KeyManager km = new WeOnlyDo.Security.Cryptography.KeyManager();
WeOnlyDo.Security.Cryptography.SSHKeyTypes type ;
try
{
Ssh1.Authentication = WeOnlyDo.Client.SSH.Authentications.PublicKey;
//type = WeOnlyDo.Security.Cryptography.SSHKeyTypes.DSAKey;
type = km.Load(textBox4.Text, dogcatchicken );
//type = km.Load(@ c:Private Key.pem , password );
Console.WriteLine(km.PublicKeyOpenSSH(type));
Ssh1.PrivateKey = km.PrivateKey(type );
Ssh1.Login = TextBox3.Text;
Ssh1.Password = ;
}
catch (Exception ex)
{
TextBox1.Text = ex.Message;
}
Ssh1.Connect(TextBox2.Text);
Complete thread:
- Example of logging in w/ a public key - gmcfarlane, 2005-01-18, 04:13
- Re: Example of logging in w/ a public key - gmcfarlane, 2005-01-18, 05:53
- Re: Example of logging in w/ a public key - wodSupport, 2005-01-18, 12:15
- Re: Example of logging in w/ a public key - gmcfarlane, 2005-01-18, 05:53