LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-24-2005, 07:31 PM   #1
GaijinPunch
Member
 
Registered: Aug 2003
Location: Tokyo, Japan
Distribution: Gentoo
Posts: 130

Rep: Reputation: 22
Can't SSH as Apache user


Hey Kids:

I'm trying to SSH from MachineA to MachineB, as a common user. As user "gp", it works fine:
$ ssh abc@MachineB uptime
9:13am up 302 days, 4:32, 8 users, load average: 0.00, 0.00, 0.00

When I try it as the apache user (which needs to do it to get some data to display on a webpage), I get this:
ssh abc@MachineB uptime
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password,keyboard-interactive).

I'm not even prompted for a password. I get the same thing if I simply try to ssh as apache, and not as user "abc". As such, the problem must be on MachineA. Even so, I've checked everything on MachineB as well, and can't find anything wrong. I've copied $HOME/gp/.ssh/known_hosts to /home/httpd/.ssh/known_hosts --- this seems to be the issue though. If I remve the file, I get "Host key verification failed".

Slight Edit before I post:
It seems I can't SSH anywhere as Apache. I always get this annoying Permission denied (publickey,password,keyboard-interactive) message. If I remove the host from the known_hosts file, then I get the "Host key verification failed", regardless of the target machine.

FYI -- the gp user is not apart of any groups.

Any help?
 
Old 11-24-2005, 11:59 PM   #2
FliesLikeABrick
Member
 
Registered: Aug 2005
Location: NY,USA
Distribution: Debian, Gentoo, Ubuntu
Posts: 103

Rep: Reputation: 15
does the apache user have a home folder? Is this how SSH acts when a user tries to login that doesn't have a home folder?
 
Old 11-25-2005, 12:04 AM   #3
GaijinPunch
Member
 
Registered: Aug 2003
Location: Tokyo, Japan
Distribution: Gentoo
Posts: 130

Original Poster
Rep: Reputation: 22
apache's home folder is /home/httpd. It's even got a .ssh folder w/ it's rsa key in there. If someone tries to login w/o a homedir, it just goes to the root and says it couldn't change directories to the non-existent homedir.
 
Old 11-25-2005, 12:05 AM   #4
FliesLikeABrick
Member
 
Registered: Aug 2005
Location: NY,USA
Distribution: Debian, Gentoo, Ubuntu
Posts: 103

Rep: Reputation: 15
heh, alright... nevermind me, I've now learned something.. thanks and sorry for the clutter
 
Old 11-25-2005, 12:46 AM   #5
abhijeetudas
Member
 
Registered: Sep 2004
Distribution: Redhat / Fedora
Posts: 114

Rep: Reputation: 15
Look @ the passwd file

Apache Users shell by default is /sbin/nologin

& it is recommended that you keep it that way!
 
Old 11-25-2005, 04:56 AM   #6
GaijinPunch
Member
 
Registered: Aug 2003
Location: Tokyo, Japan
Distribution: Gentoo
Posts: 130

Original Poster
Rep: Reputation: 22
Quote:
Originally posted by abhijeetudas
Look @ the passwd file
Apache Users shell by default is /sbin/nologin
& it is recommended that you keep it that way!
Yeah, well, I can't keep everyone happy. I either have to change the passwd file and fix this ssh issue, or make an sshd_config config change on some remote, and coincidentally very important routers.... and I've got people moaning on both sides of the iussue, so, here I am.

Anyways, I've had to change the shell to bash to figure out this ssh problem. Once it's sorted out and the script works, I'll change it back to /sbin/false, which was the default when apache was installed.
 
Old 11-27-2005, 05:47 PM   #7
GaijinPunch
Member
 
Registered: Aug 2003
Location: Tokyo, Japan
Distribution: Gentoo
Posts: 130

Original Poster
Rep: Reputation: 22
Nobody else wants to take a stab at this?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH-key for apache user? GaijinPunch Linux - Software 4 02-02-2011 05:48 AM
create a new user via ssh cccc Debian 4 08-01-2005 02:41 PM
blocking ssh for only 1 user evilchild Linux - Security 2 08-22-2004 07:48 PM
Apache Webserver 403 Forbidden Errors (User not in apache group?) Mankind75 Mandriva 4 07-08-2004 06:30 AM
HELP me on SSH User login manya Linux - Security 1 05-03-2004 04:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration