AuthorizedKeysCommand run as the user

Scott Duckworth sduckwo at clemson.edu
Sat May 31 01:00:48 EST 2014


Point AuthorizedKeysCommand to a script that runs your desired command
through sudo.  The connecting user's name is available in the first
argument.  Just make sure that sudo is configured to allow
AuthorizedKeysCommandUser to run the specified command as any user without
a password.

#!/bin/sh
sudo -u "$1" /path/to/command


On Fri, May 30, 2014 at 10:40 AM, Yves Dorfsman <yves at zioup.com> wrote:

>
> Is there any way to make the AuthorizedKeysCommand as the user which is
> trying to log in?
>
> Thanks.
>
> --
> Yves.
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev at mindrot.org
> https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
>


More information about the openssh-unix-dev mailing list