login about faq

Hi,

I'm trying to chroot certain users based on Unix group, and also trying to use public key authentication.

In the config below, if I remove the "sftuser-auth" rule, I'm able to meet both requirements for all users.

But, when I try to apply a separate rule based on group, it doesn't find the pub key.

What am I doing wrong?

<authentication-methods>
   <authentication  name="sftuser-auth" action="allow">
     <selector>
       <user-group name="sftuser" />
      </selector>
      <auth-publickey 
  authorization-file="/var/tmp/home/%username%/.ssh2/authorization"
  authorized-keys-directory="/var/tmp/home/%username%/.ssh/authorized_keys"               
  openssh-authorized-keys-file="/var/tmp/home/%username%/.ssh2/authorized_keys"
        />
        <auth-keyboard-interactive max-tries="3" failure-delay="2">
                <submethod-pam />
        </auth-keyboard-interactive>
   </authentication>
    <authentication name="allow-auth" action="allow">
      <auth-publickey 
        authorization-file="%D/.ssh2/authorization"
    authorized-keys-directory="%D/.ssh2/authorized_keys"
    openssh-authorized-keys-file="%D/.ssh/authorized_keys" />
      <auth-keyboard-interactive max-tries="3" failure-delay="2">
      <submethod-pam />
      </auth-keyboard-interactive>
    </authentication>
</authentication-methods>

Thanks, B.

asked Dec 02 '10 at 01:24

Bryan%20Calverton's gravatar image

Bryan Calverton
1111

resolved. permissions on the .ssh2 directory were off, thereby causing the auth-publickey rule to fail.

(Dec 02 '10 at 17:49) Bryan Calverton Bryan%20Calverton's gravatar image
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×54
×6

Asked: Dec 02 '10 at 01:24

Seen: 3,378 times

Last updated: Dec 02 '10 at 01:24

All user contributed content licensed under the cc-by-sa license.
Powered by OSQA.