Re: How to etablish an SSH2 tunnel with php ? [message #177477 is a reply to message #177476] |
Sun, 01 April 2012 14:42 |
Une Bvue
Messages: 30 Registered: March 2012
Karma:
|
Member |
|
|
Le 01/04/2012 16:00, Jerry Stuckle a écrit :
> That helps a lot. A quick google of your first message finds your
> hostkey method is wrong. Try "ssh-dss" and see if that doesn't work
> better.
fine thanks, right now i get :
Warning: ssh2_auth_pubkey_file(): Authentication failed for yt using
public key in /home/yt/Sites/landp_public/ssh2.php on line 46
however, the php script does :
if(ssh2_auth_pubkey_file($connection, "yt",
'/home/yt/.ssh/id_dsa.pub', '/home/yt/.ssh/id_dsa',
'Wo es war, soll Ich werden.')){
echo "Authentification réussie.<br />\n";
then, it is using the key from user 'yt' (ie. me) but, afaik, php is of
user 'www_data'.
then, perhaps, i do have to generate a key and a ~/.ssh/config for
www_data ?
using password authentification :
if(ssh2_auth_password($connection, "yt", "my_pwd")){
echo "Authentification réussie.<br />\n";
the error is :
Warning: ssh2_auth_password(): Authentication failed for yt using
password in /home/yt/Sites/landp_public/ssh2.php on line 49 Échec de
l'authentification.
|
|
|