Hello,

I'm setting up a script which uses sftp to manipulate remote files
through ssh. I created a private/public key pair for it without a pass
phrase on it, installed the public key on the remote server and now I
can use both "ssh" and "sftp" to login to it.

I'd like to restrict this key to be able to use only "sftp" and nothing else.

According to "man sshd", the "command" option should do that:

command="command"
  Specifies that the command is executed whenever this key is used
  for authentication.
  ...Note that this option applies to shell, command or subsystem execution.

So I added a "command="sftp"" to that key's line but this causes the
entire session to abort. When I remove the "command" part I can use
sftp and ssh again.

Can anyone give an example on how can I do this?

Thanks,

--Amos
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to