LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 03-06-2010, 09:27 AM   #1
Mleahy
Member
 
Registered: Jan 2004
Posts: 43

Rep: Reputation: 15
Single purpose ssh key for sshfs?


Hello,

I'm wondering if anyone can give me some guidance, or point me to a relevant reference for setting up a single purpose ssh key.

I have setup a single purpose key for rsync, where I have command="/path/to/rsync-secure" associated with the public key in .ssh/authorized_keys, and the rsync-script checks to make sure incoming commands begin with 'rsync --secure', like so:

Code:
#!/bin/sh

case "$SSH_ORIGINAL_COMMAND" in
   *\&* | *\;* | *\|*)
      echo "Access denied"
      ;;
   rsync\ --server*)
      $SSH_ORIGINAL_COMMAND
      ;;
   *)
      echo "Access denied"
      ;;
esac
What I would like to do is do something similar to allow sshfs access, and have the server path that can be mounted locked down to a particular location. Does anyone have any suggestions as to how this could be done?

As an aside, I might also want to restrict the above rsync script to only allow synchronization to a particular path.

Thanks in advance.
 
Old 03-07-2010, 02:18 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,462
Blog Entries: 54

Rep: Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899Reputation: 2899
As far as I can see Sshfs uses SFTP, it doesn't issue remote commands you could command="/path/doSomething".
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Limiting sshfs access to a specific directory, or tunneling nfs over ssh. Jophish Linux - Networking 5 01-24-2010 04:59 AM
problem doing sshfs mount with public key authentication Sambatyon Linux - Networking 1 06-15-2008 07:30 AM
LXer: Mount a remote file system through ssh Using sshfs LXer Syndicated Linux News 0 09-16-2007 09:00 AM
Single Purpose linux OS for a tiny laptop? sleepkyng Programming 6 05-26-2007 04:18 AM
Fastest protocol, SSH, SSHFS, VPN, TLS/SSL Akonbobot Linux - Security 4 05-12-2007 08:20 PM


All times are GMT -5. The time now is 10:35 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration