Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSH problem

Status
Not open for further replies.
Feb 14, 2002
88
JP
I posted this at linuxquestions.org but got no love. THought maybe someone here could help. Thanks!

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?
 
Does your /etc/passwd file have /sbin/nologin for the apache user?

 
which needs to do it to get some data to display on a webpage"... why in this way? can't you use cUrl or something else?

Cheers.

Chacal, Inc.[wavey]
 
Do you have ~/.authorized_keys for the apache user?

"If you always do what you've always done, you will always be where you've always been."
 
Does your /etc/passwd file have /sbin/nologin for the apache user?

No, I set his shell to /bin/bash, so I could login and set up the rsa key.

why in this way? can't you use cUrl or something else?

I don't know what cUrl is for one. I basically need to remotely login to each machine, and run "ps -ef". That's the end game here.

Do you have ~/.authorized_keys for the apache user?

I do not. But, AFAIK, I don't need one to ssh AS apache to another machine, no?
 
so is yor problem resolved?

curl in php

you can have a cgi script in each web server in order to run "ps -ef" and live it as text page and then get that page/file using cUrl. so no need for ssh nor open apache account into life with bash,

Cheers.

Chacal, Inc.[wavey]
 
nope, problem isn't solved yet... and I have no clue why. :(
Can't get the cUrl page to load either.
 
Okay, it loaded. I don't think that's what I'm looking for though. I'm not contacting other webservers... just other workstations.
 
Okay, it is solved. The keys were not copied right in the targets I was ssh'ing to. I checked them... a few of the users had bad keys. I think most of my nodes will use password authentication, but the ones in question want proper RSA.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top