SSH2: Authentifizierungsproblem

Alles, was PHP betrifft, kann hier besprochen werden.

SSH2: Authentifizierungsproblem

Postby Määx » 24. August 2010 13:10

Hallo zusammen,
ich habe ein kleines Programm um über ssh auf einen Server zu kommen:
Code: Select all
[...]
$connection = ssh2_connect($server_ip, 22);
if( ! $connection ){
   print "***Es konnte keine Verbindung mit ".$server_ip." hergestellt werden!<BR>";
}else{
   print "***Verbindung mit ".$server_ip." hergestellt!<BR>";

   if( $known_rsa_fingerprint != ssh2_fingerprint( $connection, SSH2_FINGERPRINT_MD5 | SSH2_FINGERPRINT_HEX  ) ){
      print "RSA HOSTKEY MISMATCH!<BR>";
   }else{
      print "***RSA hostekey ok<BR>";
      print "***authentication in progress<BR>";
      ssh2_auth_password($connection, $sftp_user, $sftp_pwd);
      $sftp = ssh2_sftp($connection);
[...]


Als Ausgabe bekomme ich dann:
***Verbindungsaufbau zu IP
***Verbindung mit IP hergestellt!
***RSA hostekey ok
***authentication in progress

Warning: ssh2_auth_password() [function.ssh2-auth-password]: Authentication failed for USER using password in [...]

Benutzer und Passwort sind ok! Wenn ich mich über putty auf den Server einwähle komme ich auch über ssh auf den Zielserver...
Woran könnte es liegen, dass ein Authentifizierungsfehler auftritt?
Vielen Dank für eure Hilfe im Vorraus!
Määx
Määx
 
Posts: 1
Joined: 24. August 2010 13:04

Return to PHP

Who is online

Users browsing this forum: No registered users and 5 guests