Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 22nd December 2008, 22:04
weezul weezul is offline
Member
 
Join Date: Jul 2008
Posts: 43
Thanks: 3
Thanked 3 Times in 2 Posts
 
Default problems with ssh2_auth_pubkey_file

Hello, i want to connect to another host using:

<?php
$connection = ssh2_connect('shell.example.com', 22, array('hostkey'=>'ssh-rsa'));

if (ssh2_auth_pubkey_file($connection, 'username',
'/home/username/.ssh/id_rsa.pub',
'/home/username/.ssh/id_rsa', 'secret')) {
echo "Public Key Authentication Successful\n";
} else {
die('Public Key Authentication Failed');
}
?>


this connection function.

so i created a keypair on the host i want to connect to and moved both keys to the other host the webserver runs on.


my problem is this function always returns false :/

so for debug reasons, where can i make the sshdemon log every connection attempt?

auth.log seems to log only authentication attempts but no connection attempts.
Reply With Quote
Sponsored Links
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ZoneMinder on Ubuntu - dependancy problems when installing mendoza HOWTO-Related Questions 4 17th July 2009 17:02
Problems with groups/grpconv linuxfast General 28 21st April 2008 10:35
Management/system config/settings & /server/settings not working!! dactor Installation/Configuration 9 6th February 2008 10:11
Empty Recycle Bin jon335 General 40 6th May 2006 12:56
Help! Real newbie having problems installing Linux t-kiss Kernel Questions 5 4th April 2006 16:14


All times are GMT +2. The time now is 09:22.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.