Re: /root/.ssh/authorized_keys and command= entries
On Fri, Oct 21, 2005 at 09:48:06PM -0700, David Christensen wrote:
> Debian user:
>
> I am trying to figure out how to execute a shutdown on a Debian 3.0 machine
> using "ssh root@<host> <command>" syntax, but don't want to allow root logins.
>
>
> RTFM "man sshd_config" indicates that I need the following line in
> /etc/ssh/sshd_config:
>
> PermitRootLogin forced-commands-only
>
>
> Restarting sshd, the above configuration setting alone is insufficient. STFW
> "sshd_config forced-commands-only", it looks like the chosen command
> (/sbin/shutdown, in my case) needs to be included in /root/.ssh/authorized_keys
> somehow. Does anybody know where the syntax is defined?
>
If you google for
forced command OpenSSH .authorized_keys
and look down a few links ...
I think what you may need to do is insert
command="/sbin/shutdown" immediately before the dss in your
key itself.
Chapter 8 of the O'Reilly book on SSH may help as that was referenced.
>
> TIA,
>
> David
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: