The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
grep unix.com with google



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #8 (permalink)  
Old 05-20-2008
JCR JCR is offline
Registered User
 

Join Date: Jan 2007
Posts: 41
The user is apache and finger apache returns
Login: apache Name: Apache
Directory: /var/www Shell: /sbin/nologin
Never logged in.
No mail.
No Plan.
I did:

cd /var/www
cp -R ~/.ssh ./
chown -R apache .ssh
chgrp -R apache .ssh

but apache is still unable to find those keys when calling the php script. I am using an apache virtual host and I copied that same .ssh folder to the DocumentRoot without better results.
Any idea?
Thank you
  #9 (permalink)  
Old 05-20-2008
ripat ripat is offline Forum Advisor  
Registered User
 

Join Date: Oct 2006
Location: Belgium
Posts: 441
On the target server you need to create also a ./var/www/.ssh/ directory that should contain the authorized_keys file in which you should add the user "apache" public key.

Instead of copying the root keys or any other key, I would rather create a new set of key with ssh-keygen command under apache user. Transfer the public key to the target server and add that key to the /var/www/.ssh/authorized_keys file.
  #10 (permalink)  
Old 05-20-2008
JCR JCR is offline
Registered User
 

Join Date: Jan 2007
Posts: 41
Thank you for the answer. How do I create a new set of keys with ssh-keygen under he apache user? Do I need to login as apache? I am not sure where to find the password.
  #11 (permalink)  
Old 05-20-2008
ripat ripat is offline Forum Advisor  
Registered User
 

Join Date: Oct 2006
Location: Belgium
Posts: 441
Login as root and:
# su apache

$ ssh-keygen -t rsa

Leave the pass phrase empty.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
passing variable from bash to perl from bash script arsidh Shell Programming and Scripting 10 06-04-2008 01:25 PM
Bash rsync but move not delete Movomito Shell Programming and Scripting 1 04-30-2008 05:37 PM
rsync over ftp Hitori UNIX for Advanced & Expert Users 2 03-14-2008 01:42 PM
rsync in ftp Euler04 Shell Programming and Scripting 5 10-24-2005 08:17 AM
Rsync darknite87 UNIX for Advanced & Expert Users 1 06-06-2002 04:37 PM



All times are GMT -4. The time now is 02:17 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0