[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need Help in creating SSH Server using LIBSSH


On Thursday 30 May 2013 09:15:07 Ashish Mangla wrote:
> Hi
> 
> I have created a SSH server using latest release of LIBSSH library the
> targeted environment is Windows 7 64-bit, Visual Studio 2010, but I am not
> successful in getting it work. Despite of many trails still I am getting a
> error "Could n't create BIO". I browsed through internet and come to know
> that the key folder must have read access. This I checked it and there is
> no problem in reading the problem ( I wrote a sample C++ program   whether
> I can open file or not. The program is successful in reading the file (of
> course in Binary )). Now I am helpless in finding the reason for the error.
> Here is what options I have set please let me know where I am doing wrong.
> 
> If any sample program for SSH server on windows is really helpful.

First you need to create a rsa and dsa host key.

ssh-keygen -t dsa -f ssh_host_dsa_key -N ''
ssh-keygen -t rsa -b 2048 -f ssh_host_rsa_key -N ''

After that you need to set them with

ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_DSAKEY, 
"/path/to/ssh_host_dsa_key");
ssh_bind_options_set(sshbind, SSH_BIND_OPTIONS_RSAKEY, 
"/path/to/ssh_host_rsa_key");

Have you done that?

> I have set the bind options with DSA and RSA key and the folder name given
> as "C:\Users\ravikumarS\.ssh\ida_rsa.pub".

Well it expects a private key not a public key ...

-- 
Andreas Schneider                   GPG-ID: F33E3FC6
www.cryptomilk.org                asn@xxxxxxxxxxxxxx


Follow-Ups:
RE: Need Help in creating SSH Server using LIBSSHAshish Mangla <Ashish.Mangla@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org