Problem mit Trial of SSH-Server (wodSSH / wodSSH.NET)
Hello!
I am having strong problems while testing SSH-Server.
When using DLL, my App just stops after calling:
sshd1 = new wodSSHDComLIB.wodSSHDComClass();
When using OCX, compiler throws an class not registered error.
I am using Visual Studio 2008 on Windows 7 x64.
I would really love to buy this product as it seems to fit my needs, but right now I am stuck..
greets from germany,
Michael
Re: Problem mit Trial of SSH-Server
Hi Michael,
Can you please make sure that you force your application to compile as 32-bit?
In Visual Studio, just set Target CPU to x86, and it should work.
Can you please try that?
Regards,
Damba
Re: Problem mit Trial of SSH-Server
Hi!
Works now.
I am trying to build an simple application which just takes public key auth and supports port forwarding.
Here my approach using c#:
[code]
private void Form1_Load(object sender, EventArgs e)
{
ssh = new wodSSHDComLIB.wodSSHDComClass();
String FileName = AppDomain.CurrentDomain.BaseDirectory + server.rsa ;
if (System.IO.File.Exists(FileName) == false)
{
ssh.Keys.Generate(wodSSHDComLIB.SSHKeyTypes.RSAkey, 1024);
ssh.Keys.Save(wodSSHDComLIB.SSHKeyTypes.RSAkey, FileName, null);
}
else
{
ssh.Keys.Load(FileName, null);
ssh.Port = 22;
}
ssh.LoginPubkey += new wodSSHDComLIB._IwodSSHDComEvents_LoginPubkeyEventHandler(ssh_LoginPubkey);
ssh.ServiceRequest += new wodSSHDComLIB._IwodSSHDComEvents_ServiceRequestEventHandler(ssh_ServiceRequest);
ssh.Start(ssh.Port);
MessageBox.Show( started );
}
void ssh_LoginPubkey(wodSSHDComLIB.SSHUser User, string Login, string PublicKey, ref wodSSHDComLIB.SSHActions Action)
{
MessageBox.Show( Login Request );
String pkey_file = Application.StartupPath + \keys\ + Login;
if (File.Exists(pkey_file))
{
StreamReader reader = new StreamReader(pkey_file);
String pkey = reader.ReadToEnd();
reader.Close();
lbl1.Text = pkey +
+ PublicKey;
if (pkey.Equals(PublicKey)) Action = wodSSHDComLIB.SSHActions.Allow;
else Action = wodSSHDComLIB.SSHActions.Deny;
}
else
{
Action = wodSSHDComLIB.SSHActions.Deny;
}
}
[/code]
I get the MessageBox started , but the others are never fired..
Did I forget something?
Thanks for help!
Hi Michael,
Can you please make sure that you force your application to compile as 32-bit?
In Visual Studio, just set Target CPU to x86, and it should work.
Can you please try that?
Regards,
Damba
Re: Problem mit Trial of SSH-Server
Hi Michael,
LoginPubKey is only triggered when user tries authenticating using PublicKey auth. You should set your Authentication property to AuthPubKey or AuthBoth in order for it to trigger.
If not set, LoginPassword is triggered, but in this case user is rejected, since Accept parameter wasn't set to allow, and no other event will be triggered.
Can you try setting Authentication property to PubKey (2) and set Action = Allow in LoginPubKey event?
Regards,
Damba
Re: Problem mit Trial of SSH-Server
Hi!
Works now, I bought my Version!
I have one another problem, but I will open a new thread for it.
regards,
Michael
Hi Michael,
LoginPubKey is only triggered when user tries authenticating using PublicKey auth. You should set your Authentication property to AuthPubKey or AuthBoth in order for it to trigger.
If not set, LoginPassword is triggered, but in this case user is rejected, since Accept parameter wasn't set to allow, and no other event will be triggered.
Can you try setting Authentication property to PubKey (2) and set Action = Allow in LoginPubKey event?
Regards,
Damba