F-Secure Server - WeOnlyDo Client issue to authen (General questions)
I installed the F-secure server and tried to connect using WeOnlyDo client. I am unable to authenticate using Public/Private key pair. It works fine with F-Secure Server - F-secure client. When tried to connect F-secure server with User Name Password from WeOnlyDo client it worked fine.
Attached is the list of steps i did along with the code snippet.
1. Code to create Public/Private Key
        //Private Key
 String Filename = @ C:UserKeysWeOnlyDoSshUser ;
 //Public Key
 String FilenamePub = @ C:UserKeysWeOnlyDoSshUser.pub ;
 
 KeyManager km = new KeyManager();
 try
 {
  km.Generate(SSHKeyTypes.DSAKey );
  km.Save(SSHKeyTypes.DSAKey, Filename);
  
 //Public Key Tried copying and pasting from the output 
  Console.Write(km.PublicKeySSH(SSHKeyTypes.DSAKey));
 //Public Key Tried directly writing to file
  StreamWriter sw = new StreamWriter(FilenamePub);
  sw.Write(km.PublicKeySSH(SSHKeyTypes.DSAKey));
  sw.Flush();
  sw.Close();
 }
 catch(Exception ex)
 {
  string msg = ex.Message ;
 }
   
2. Created a user 'SshUser' (Local to that machine) in the server running F-secure Server 
4. Copied WeOnlyDoSshUser.pub to C:Documents and Settingssshuser.ssh2
5. Created a file named authorization in the above stated folder with key WeOnlyDoSshUser.pub as text data
6. F-Secure server setting are default except only enabled authentication is Public Key
7. Code to connect to server
 SSH Ssh1 = new SSH();
 Ssh1.Hostname = TextBox2.Text //IP Address;
 Ssh1.Login =  sshuser ;
 Ssh1.Port =22;
 String Filename = @ CUserKeysWeOnlyDoSshUser ;
 Ssh1.Protocol = WeOnlyDo.Client.SSH.SupportedProtocols.SSH2;
 Ssh1.Timeout = 30;
 Ssh1.Authentication = WeOnlyDo.Client.SSH.Authentications.PublicKey;
   
 WeOnlyDo.Security.Cryptography.KeyManager km = new WeOnlyDo.Security.Cryptography.KeyManager();
WeOnlyDo.Security.Cryptography.SSHKeyTypes type = km.Load(Filename);
 Ssh1.PrivateKey = km.PrivateKey(type);
 Ssh1.Connect();
------------------------------------------------------------
 This is showing error
  Authentication with the server failed.
------------------------------------------------------------
Note : While connecting using f-secure client to F-secure server 
       using Public key it's working.  
       While connecting using WeOnlyDo client to F-secure server 
       using Password it's working.  
Please help me
Thanks
Sreekumar











