[nycbug-talk] SSH not working for particular user

Okan Demirmen okan
Sat Aug 6 23:07:52 EDT 2005


On Sat 2005.08.06 at 20:46 -0400, Francisco Reyes wrote:
> On Sat, 6 Aug 2005, Charles Sprickman wrote:
> 
> >>The output from /var/messages is
> >>
> >>sshd[27236]: error: PAM: authentication error for fran from <my machine>
> >
> >What's in /var/log/auth.log?  SSHD by default (on FreeBSD) will log more 
> >interesting stuff there.
> 
> Same error.
> 
> I actually found the problem.. was planning to send note to list, but 
> looking into another issue and got caught up. :-(
> 
> The rights of the .ssh directory were wrong.
> I needs to be 700. I just wish sshd would say something about it.. 
> somewhere.. anywhere.. It's near trivial to fix, yet it could be a few 
> days before one things of looking at that. :-(

uhm. i don't know what freebsd has done here (or your setup), but it
clearly shows you - from both v1 and v2 pubkey auth:

        if (options.strict_modes &&
            secure_filename(f, file, pw, line, sizeof(line)) != 0) {
                fclose(f);
                logit("Authentication refused: %s", line);
                restore_uid();
                return 0;
        }

which shows up like this in my logs:
Aug  6 22:38:44 hydrogen sshd[23929]: Authentication refused: bad
ownership or modes for directory /home/okan/.ssh
Aug  6 22:38:44 hydrogen sshd[23929]: Authentication refused: bad
ownership or modes for directory /home/okan/.ssh

$0.02
okan




More information about the talk mailing list