note 88391 rejected from function.ssh2-auth-password by danbrown
| From: | danbrown@php.net | Date: | Thu, 22 Jan 2009 14:33:25 +0000 |
| Subject: | note 88391 rejected from function.ssh2-auth-password by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-149661@lists.php.net to get a copy of this message | ||
Note Submitter: mataxetos at hotmail dot es
----
//Obtengo datos de la bdd
$id = $_GET['id'];
$seleccio = "SELECT * FROM servers WHERE id = '$id'";
$resultat = mysql_query($seleccio);
$filaResultat = mysql_fetch_array($resultat);
//Cargo las variables con los datos recogidos
$nombre = $filaResultat[fuser];
$pass = $filaResultat[fpass];
$vip = $filaResultat['vip'];
//Hago la conexion al servidor
$connection = ssh2_connect("$vip", 22);
if (ssh2_auth_password($connection, "$nombre", "$pass")) {
ERROR:
Warning: ssh2_auth_password() [function.ssh2-auth-password]: Authentication failed for pere1 using
password in /opt/lampp/htdocs/ventrilo/start.php on line 52
Imposible Conectar con SSH2
PROBLEM:
the problem is in the $ pass, if I do I take the data from the database, it does not work, but if I
write the password if it works .. Why?