Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-24-2005, 07:31 PM
|
#1
|
Member
Registered: Aug 2003
Location: Tokyo, Japan
Distribution: Gentoo
Posts: 130
Rep:
|
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?
|
|
|
11-24-2005, 11:59 PM
|
#2
|
Member
Registered: Aug 2005
Location: NY,USA
Distribution: Debian, Gentoo, Ubuntu
Posts: 103
Rep:
|
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?
|
|
|
11-25-2005, 12:04 AM
|
#3
|
Member
Registered: Aug 2003
Location: Tokyo, Japan
Distribution: Gentoo
Posts: 130
Original Poster
Rep:
|
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.
|
|
|
11-25-2005, 12:05 AM
|
#4
|
Member
Registered: Aug 2005
Location: NY,USA
Distribution: Debian, Gentoo, Ubuntu
Posts: 103
Rep:
|
heh, alright... nevermind me, I've now learned something.. thanks and sorry for the clutter
|
|
|
11-25-2005, 12:46 AM
|
#5
|
Member
Registered: Sep 2004
Distribution: Redhat / Fedora
Posts: 114
Rep:
|
Look @ the passwd file
Apache Users shell by default is /sbin/nologin
& it is recommended that you keep it that way!
|
|
|
11-25-2005, 04:56 AM
|
#6
|
Member
Registered: Aug 2003
Location: Tokyo, Japan
Distribution: Gentoo
Posts: 130
Original Poster
Rep:
|
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.
|
|
|
11-27-2005, 05:47 PM
|
#7
|
Member
Registered: Aug 2003
Location: Tokyo, Japan
Distribution: Gentoo
Posts: 130
Original Poster
Rep:
|
Nobody else wants to take a stab at this?
|
|
|
All times are GMT -5. The time now is 06:24 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|