{ 6 comments… read them below or add one }

1 nick 06.05.07 at 4:34 pm

This works great on local users it seems, but its not having any effect on ldap users, or groups, what would you suggest as a way to control their access?

2 vivek 06.05.07 at 6:04 pm

It should work, you need to play with pam modules. Pam is designed for this kind of work only.

3 Gerald 08.28.09 at 10:32 am

Hi,
If you want block all ssh access (via login/password) AND vi authorized_keys, you shoud use ‘account required pam_listfile.so item=user sense=allow file=/etc/ssh/sshd.allow onerr=succeed’

because ‘auth xxx’ line seems not checked if sshd use public keys authentification.

Bst Regard
GeraldH

4 Bhagesh 09.02.09 at 11:52 am

It is working fine for ssh and scp.
Now I wants to block only the ssh login session. and I required the scp file transfer
anybody have an Idea

5 Chuck Hale 12.22.09 at 11:34 am

Article solved my problem!

6 Kevin 12.30.09 at 11:21 pm

In my experience, the line:
auth required pam_listfile.so item=user sense=allow file=/etc/sshd/sshd.allow onerr=fail

must be prepended (i.e., placed as the first line) in the file, not appended as this article states.

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post:

Next post: