sdcsdc sdcsdc wrote: > >> Are you going to fix the bug with the FreeBSD authentication > >> error? > > > >Not without help I believe. > > Do you have idea why it don't work.
Let's have a look at the debug messages you sent. More below. > Please, I can't finish my project without libssh2. Well, that is really your problem. But since I do want libssh2 to work with FreeBSD, maybe I can help you find the problem. > Can you send me a fixed copy of libssh2 for linux and BSD > or tell me where to fix the source code to make it work? If I knew how to fix something I would just do it and commit to the public git. It is not very nice to ask for that kind of help in an open source project. Noone on this mailing list works for you. You're supposed to solve your own problems. Depending on licensing terms, you must also give your solutions back to the community. Let's look at the debug output you sent: sdcsdc sdcsdc wrote: > server# /usr/sbin/sshd -ddd > debug2: load_server_config: filename /etc/ssh/sshd_config .. > Connection from 192.168.1.101 port 36260 > debug1: Client protocol version 2.0; client software version > libssh2_1.2.1-20091002 PHP Incoming connection. > debug1: userauth-request for user rcbandit service ssh-connection method > password SSH supports many authentication methods. This client now tries to authenticate as the user rcbandit, using the "password" method. .. > debug2: Unrecognized authentication method name: password But the server does not accept this authentication method. > Received disconnect from 192.168.1.101: 11: PECL/ssh2 > (http://pecl.php.net/packages/ssh2) And when the authentication fails, the client chooses to disconnect. > I hope that this is helpful It clearly shows that the login fails because of your server configuration. The FreeBSD server doesn't accept the SSH authentication method "password" and that is the only method attempted by the client. So, you have a few choices: 1. Enable the password authentication method on the BSD servers This is a bad idea if they are reachable via internet, but is a simple solution if you only have a private network between SSH client and server. 2. Use public key authentication I would recommend this. With a public key you can also very easily restrict what the client can do on the server. See the OpenSSH documentation. (man sshd, read about the authorized_keys file) 3. Try to authenticate using the keyboard-interactive method This is a really bad idea because keyboard-interactive was designed to be used exclusively for communicating with a human, and you do not want a human to deal with logging in to the FreeBSD servers, you want that done by your program. keyboard-interactive is often used in combination with PAM to log in using a password, but the PAM modules just provide a message which is then sent untouched via SSH to the human, and the response is sent back, also untouched, via SSH to the PAM stack. The prompt is natural language text and it's just stupid to try to interpret such a prompt in a program. It will break when the PAM module is changed. //Peter _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
