ssh2 connection

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ssh2 connection

    hi, ich habe ein Problem mit meiner ssh2 connection. Folgender Fehler tritt bei mir auf:

    Die ausgaben [Connection...], [Connected], [Authenticating...] werden ausgegeben und dann kommt Folgender Fehler:

    Warning: ssh2_auth_password() [function.ssh2-auth-password]: Authentication failed for root using password in C:\Programme\xampp\htdocs\index.php on line 18
    Hier der Code

    PHP Code:
    <?
    echo "[Connecting...]<br>";
    $ssh2 = ssh2_connect('10.17.13.53',22,array('hostkey'=>'ssh-dss'));

    if(!$ssh2)
    {
        die("[Could not Connect...]<br>");
    }
    else
    {
        echo "[Connected]<br>";
    }

    echo "[Authenticating...]<br>";

    if (ssh2_auth_password($ssh2, 'root', 'meinpw'))
    {
      echo "Authentication Successful!\n";
    }
    else
    {
      die('Authentication Failed...');
    }
    ?>
    mein acc und mein pw stimmen ich habe sie auch schon ausprobiert (per shell und so).

    Woran liegt das?

    MfG Basti

  • #2
    Hi,

    hast du mal in die Logfile des Servers geguckt ?

    Bei mir isses /var/log/auth.log

    Jun 28 20:02:17 hostname sshd[20258]: Accepted password for myusername from 127.0.0.1 port 39989 ssh2

    Jun 28 20:02:17 hostname sshd[20260]: Received disconnect from 127.0.0.1: 11: PECL/ssh2 (http://pecl.php.net/packages/ssh2)

    Schau mal was bei dir steht , die Logfile sagt meist mehr aus.


    bzw probiers doch einfach mal so

    PHP Code:

    $connection 
    ssh2_connect('127.0.0.1'22); 
    ohne

    PHP Code:

    array('hostkey'=>'ssh-dss'

    Gruß,
    Jan
    Last edited by Elko; 29-06-2006, 16:29.

    Comment


    • #3
      ich finde leider das logfile nicht, kann ich das irgendwie suchen oder in einer config nachguggen wo es hingeschrieben wird?

      Comment


      • #4
        suchen kannst du mit

        'locate filename'

        vorher vielleicht noch einmal 'updatedb'

        'find' sollte auch funktionieren, ist mir persönlich aber zu umständlich

        Comment

        Working...
        X