Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re: authentication method shell variable? |
|---|---|
| Date: | Wed, 30 Aug 2006 20:04:28 +0100 |
Jaqui Greenlees wrote:
In a recent discussion about secure ssh use the idea of having ssh export the authentication method as a shll variable. The idea being to limit su access to only those who have used a public / private key pair for authentication.
Easy... Compile sshd with the match keyword patch (http://bugzilla.mindrot.org/show_bug.cgi?id=1180), and use it to ensure that members of the admin group can only log in using public/private key authentication. Also make these users a member of the wheel group, and ensure that only they can su - check out /etc/pam.d/su. For example, in /etc/ssh/sshd_config add: Match Group admins PubkeyAuthentication yes PasswordAuthentication no ChallengeResponseAuthentication no In /etc/pam.d/su ensure the following is uncommented: # Uncomment the following line to require a user to be in the "wheel" group. auth required /lib/security/$ISA/pam_wheel.so use_uid I use this method to ensure that admins can only log in using public/private keys and have access to perform admin functions while (hopefully) ensuring that "normal" users cannot mess about. This also has the advantage that if any user uploads their own keys to ~/.ssh that they will not be able to gain admin rights!!! Ben
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Need some education: Man-in-the-Middle Attacks, Mark Senior |
|---|---|
| Next by Date: | Re: openssh usePAM publickey and pam_filter issue, Benjamin Donnachie |
| Previous by Thread: | Re: authentication method shell variable?, Derek Martin |
| Next by Thread: | Permission denied (publickey,keyboard-interactive)., Michael Hoeller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |