KpyM Telnet/SSH Server - Forum
How to use cryptlib to connect to SSH Server |
Linus |
How to use cryptlib to connect to SSH Server |
Feb 01 2007 04:07 |
|
Hi, I have been testing on the SSH Server and using the cryptlib that the server is using to write a client to connect. As I follow the document, when i connect to the Kpym SSH Server, i keep on getting CRYPT_ERROR_WRONGKEY. here is my code,
status = cryptCreateSession( &cryptSession, CRYPT_UNUSED, CRYPT_SESSION_SSH );
if( status != CRYPT_OK )
{
return (false);
}
char serverName[] = "localhost";
char username[] = "root";
char password[] = "pass";
status = cryptSetAttributeString(cryptSession, CRYPT_SESSINFO_SERVER_NAME, serverName, strlen( serverName ));
if( status != CRYPT_OK )
{
return (false);
}
status = cryptSetAttributeString(cryptSession, CRYPT_SESSINFO_USERNAME, username, strlen(username));
if( status != CRYPT_OK )
{
return (false);
}
status = cryptSetAttributeString(cryptSession, CRYPT_SESSINFO_PASSWORD, password, strlen(password));
if( status != CRYPT_OK )
{
return (false);
}
status = cryptSetAttribute( cryptSession, CRYPT_SESSINFO_VERSION, 2 );
if( status != CRYPT_OK )
{
return (false);
}
status = cryptSetAttribute( this->cryptSession, CRYPT_SESSINFO_ACTIVE, 1 );
then I get CRYPT_ERROR_WRONGKEY.
|
Kroum Grigorov |
|
Feb 02 2007 11:27 |
|
I have never played with cryptlib ssh client functions, so this is shot in the dark.
Might be there is some problem with the server RSA key, probably you have to load it first in the client context or something.
I could advise you to try your client with some other ssh server implementation. Although KTS follows the SSH protocol it doesn't use the most common SSH authentication sequence, and cryptlib sometimes chokes on "strange" SSH implementations.
Finally, it is possible that there's some bug in the cryptlib ssh client code.
If you can't find solution to your problem, you can post the problem on the cryptlib mailing list. Most of the questions are answered. You can get more info on cryptlib mailing list from Peter Gutmann's site
l0c41://www.cs.auckland.ac.nz/~pgut001/cryptlib/
Kroum
|
Manuel beltran |
|
Apr 01 2015 12:55 |
|
I am using cryptlib with the ssh server from kts, all is fine, but when start the comuniction with the cryptPopData function allwais the -32 (CRYPT_ERROR_BADDATA) is returned
this is only with a terminal emulator named HOSTACCES, with putty runs fine.
Any ideas
Manuel
|
© 2007 - 2008 Kroum Grigorov