[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem in ssh_connect()
[Thread Prev] | [Thread Next]
- Subject: Problem in ssh_connect()
- From: "DUBOIS, FLORENT (FLORENT)" <florent.dubois@xxxxxxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Mon, 28 Feb 2011 16:25:59 +0100
- To: "libssh@xxxxxxxxxx" <libssh@xxxxxxxxxx>
Hello, I have a problem when I try to connect to a server with ssh_connect() I use libSSH 0.4.7-1 on Windows XP, with Visual C++ 6.0 (binaries from http://winkde.org/pub/kde/ports/win32/releases/stable/latest/) The program tries to connect successively to different servers. On the most servers, the connection and all the tasks using libSSH work well But with some servers, the function ssh_connect() blocks indefinitely the program, even if I set the option SSH_OPTIONS_TIMEOUT to 5 seconds. The code for the connection is: if(m_bIsConnected) return false; int port = 22, rHost, rPort, rTimeout; rHost = ssh_options_set(m_session, SSH_OPTIONS_HOST, host); rPort = ssh_options_set(m_session, SSH_OPTIONS_PORT, &port); rTimeout = ssh_options_set(m_session, SSH_OPTIONS_TIMEOUT, &timeout); if( (rHost + rPort + rTimeout) != 0) return false; if (ssh_connect(m_session) != SSH_OK) return false; m_bIsConnected = true; return true; Is there a solution to this problem? Regards
Archive administrator: postmaster@lists.cynapses.org