Re: How to etablish an SSH2 tunnel with php ? [message #177478 is a reply to message #177477] |
Mon, 02 April 2012 01:19 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 4/1/2012 10:42 AM, Une Bévue wrote:
> 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.
>
>
Does your www-data user have access to the key files? They need to be
readable by www-data (but you shouldn't have to create a new key for the
web user).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|