title: libssh session connection timed out error
body: <p>I've downloaded and compiled libssh 0.6.1 from <a href="http://www.libssh.org" rel="nofollow">libSSH</a> .<br>
  I also linked the ssh.lib,ssh.dll to a visual c++ project .<br>
  The library with code below compiles and run fine ,<br>
  but when calling ssh_connect() , it return -1 : Timeout .<br>
  I used the option :  </p>
  
  <blockquote>
    <p>ssh_options_set(my_ssh_session, SSH_OPTIONS_LOG_VERBOSITY, &amp;verbosity);</p>
  </blockquote>
  
  <p>to print the logging , and it says :  </p>
  
  <blockquote>
    <p>ssh_connect : socket connecting now waiting for callbacks to work.<br>
    ssh_connect : Timeout connecting to local host.  </p>
  </blockquote>
  
  <p>On my laptop i installed <a href="http://www.freesshd.com/" rel="nofollow">FreeSSHd</a> server and connecting to it using putty works .  </p>
  
  <p>My code, until the error :  </p>
  
  <pre><code>int _tmain(int argc, _TCHAR* argv[])
  {
  
  ssh_session my_ssh_session;
  int verbosity = SSH_LOG_PROTOCOL;
  int port = 22;
  int rc;
  char *password;
  // Open session and set options
  my_ssh_session = ssh_new();
  if (my_ssh_session == NULL)
      exit(-1);
  ssh_options_set(my_ssh_session, SSH_OPTIONS_HOST, "localhost");
  ssh_options_set(my_ssh_session, SSH_OPTIONS_LOG_VERBOSITY, &amp;verbosity);
  ssh_options_set(my_ssh_session, SSH_OPTIONS_PORT, &amp;port);
  // Connect to server
  rc = ssh_connect(my_ssh_session);
  if (rc != SSH_OK)
  {
      fprintf(stderr, "Error connecting to localhost: %s\n",
          ssh_get_error(my_ssh_session));
      ssh_free(my_ssh_session);
      exit(-1);
  }
  </code></pre>
  
  <p>This code example is copied from the <a href="http://api.libssh.org/master/libssh_tutor_guided_tour.html" rel="nofollow">A typical SSH session Exmple</a> site .</p>