Operating System - Linux
1828504 Members
3273 Online
109978 Solutions
New Discussion

Re: ssh failling on password authentication

 
K.C. Chan
Trusted Contributor

ssh failling on password authentication

All,
I man using ssh-agent, it works well however when I ssh vi "ssh someone-else@hostxyz" the password authenication failed. here's a snip of the err:
"debug1: next auth method to try is password
root@localhost's password:
[*] error opening config file".

Does any one have any idea why this is happening? Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
8 REPLIES 8
Hal Rottenberg
Frequent Advisor

Re: ssh failling on password authentication

I don't have the answer, but I've seen the same post before so I thought I'd at least make a stab at it. It's not for lack of trying--I could not find that error message referenced anywhere.

- Check the permissions on the ~/.ssh directory and the files in it, also /etc/ssh_config.

- I think you are already running with verbose, right? If not, do that see if a more useful error shows up.

- If you have control of the server, see what the errors if any are on it.

- Can other users ssh into this server?

-hal
If at first you don't succeed, then skydiving isn't for you.
Jonathan Sharp_1
New Member

Re: ssh failling on password authentication

I assume you're logged in as root on the local box. If so, cd ~/ and do an ls -al. If you see a .ssh directory check permissions (as above post stated) if it doesn't exist. Create it. See if that works.
K.C. Chan
Trusted Contributor

Re: ssh failling on password authentication

I am running ssh as a regular user. I am able to run ssh as root but not as a regular user.

Yes, I have control on both server and yes, I am running ssh in verbose mode. The permission on my home dirs looks ok. The permission on /etc/ssh looks ok as well. Does any one have any idea why ssh is behaving like this? Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
K.C. Chan
Trusted Contributor

Re: ssh failling on password authentication

Here's what I got on /var/log/messages from the recipient server: ...sshd(pam_unix)[31180]: session closed for user root
...sshd(pam_unix)[31323]: session opened for user root b
y (uid=0)

still the same error, here's a stripped down err msg:
debug1: next auth method to try is password
[*] error opening config file

Any idea?
Reputation of a thousand years can be determined by the conduct of an hour
K.C. Chan
Trusted Contributor

Re: ssh failling on password authentication

By the way the config file /etc/ssh are all the same through out my environment, and only this box I am having problem with. Here's the view on /etc/ssh:
-rw------- 1 root root 88039 Apr 4 22:27 moduli
-rw-r--r-- 1 root root 1167 Jul 24 12:13 ssh_config
-rw------- 1 root root 2528 Apr 4 22:27 sshd_config
-rw------- 1 root root 668 Jul 31 2001 ssh_host_dsa_key
-rw-r--r-- 1 root root 590 Jul 31 2001 ssh_host_dsa_key.pub
-rw------- 1 root root 515 Jul 31 2001 ssh_host_key
-rw-r--r-- 1 root root 319 Jul 31 2001 ssh_host_key.pub
-rw------- 1 root root 887 Jul 31 2001 ssh_host_rsa_key
-rw-r--r-- 1 root root 210 Jul 31 2001 ssh_host_rsa_key.pub

Here's the view from one of the other system:
-rw------- 1 root root 26287 Apr 8 2001 primes
-rw-r--r-- 1 root root 1122 Apr 8 2001 ssh_config
-rw------- 1 root root 1686 Apr 8 2001 sshd_config
-rw------- 1 root root 668 Jul 10 2001 ssh_host_dsa_key
-rw-r--r-- 1 root root 590 Jul 10 2001 ssh_host_dsa_key.pub
-rw------- 1 root root 527 Dec 13 2000 ssh_host_key
-rw-r--r-- 1 root root 331 Dec 13 2000 ssh_host_key.pub
-rw------- 1 root root 887 Jul 10 2001 ssh_host_rsa_key
-rw-r--r-- 1 root root 210 Jul 10 2001 ssh_host_rsa_key.pub
-rw------- 1 root root 512 Jul 10 2001 ssh_random_seed

I have no problem when I am root, I have this err when I am ssh-ing as a regular user. The permission of the files are exactly unlike as other systems in the environment. However, on all other system I can ssh as regular user to this box. But for some strange reason I can not ssh out as regular user on this box. By the way I am using ipchains or iptables. Is there some file out there that's preventing regular user to use the authentication when ssh-ing to other box?
Reputation of a thousand years can be determined by the conduct of an hour
Chris Slater
New Member

Re: ssh failling on password authentication

I would say it is not ipchains or iptables since root can get out. Those rules are not user specific.

What is the output of ls -ld /etc/ssh ?

Also, I would move the .ssh directory in the user's home to .ssh.bak.

This may sound a bit silly, but does the user have write permission to his own home directory?

Hope this helps,

Chris
K.C. Chan
Trusted Contributor

Re: ssh failling on password authentication

here's the perm: drwxr-xr-x 2 root root 4096 Jul 24 12:13 /etc/ssh
and yes user has write perm to user's own home.
Reputation of a thousand years can be determined by the conduct of an hour
Jeffrey S. Sims
Trusted Contributor

Re: ssh failling on password authentication

Since it looks like you are trying to ssh as root, have you checked the sshd_config file on the server you are trying to ssh to? There may be a line not allowing root ssh. It would look something like this:
PermitRootLogin no
you can either change that to yes or login as a different user if that is the case.

Hope this helps.