LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-12-2014, 10:46 PM   #1
xmrkite
Member
 
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554

Rep: Reputation: 30
Rsync over ssh but not allow terminal access


Is there a way I can setup rsync over ssh but have it so that all the user can do is rsync over ssh? I don't want some particular users to have access to a shell. I just want them to be able to backup. I am looking for the simplest way possible.

Thank you.
 
Old 02-13-2014, 05:49 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
http://www.pizzashack.org/rssh/
 
Old 02-13-2014, 07:07 PM   #3
xmrkite
Member
 
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554

Original Poster
Rep: Reputation: 30
I saw that but just can't figure out the whole chroot thing with rsync. I guess I need to copy over a bunch of files and whatnot but am simply lost. I ran the script that rssh includes and while it copied a bunch of files over, it didn't work.

I'm running ubuntu 12.10 on that particular computer.
 
Old 02-14-2014, 10:20 AM   #4
xmrkite
Member
 
Registered: Oct 2006
Location: California, USA
Distribution: Mint 16, Lubuntu 14.04, Mythbuntu 14.04, Kubuntu 13.10, Xubuntu 10.04
Posts: 554

Original Poster
Rep: Reputation: 30
Ok I got part of the answer...I can use ssh_authorized keys and the command= parameter to do this.

So I created a key and put the following in front of it on the same line in authorized_keys:

command="rsync --server -vlogDtprze.iLsf . /home/tester/Downloads" ssh-rsa AAAAB3NzaC1yc2--etc

Then i ssh to the server via the command: rsync -avz -e ssh /home/me/Downloads tester@192.168.1.100:/home/tester/Downloads

This seems to work. Also, if I change the /home/tester/Downloads it is ignored and my rsync only goes to that folder as that is what's in my authorized_keys file.

My question is how do I run two separate rsync commands but keep them limited to just those two commands? For example, I will want to backup my home directory and my /media/other_files directory.
 
  


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
LXer: How to access ssh terminal in web browser on Linux LXer Syndicated Linux News 0 09-28-2013 06:51 AM
[SOLVED] rsync fails in cron - ssh key prob for rsync? jonathansfl Linux - Server 6 12-09-2010 09:48 AM
LXer: Install Anyterm for remote terminal access without SSH LXer Syndicated Linux News 0 03-19-2008 02:20 PM
access linux with connected mac using terminal through ssh Ultrus Linux - Networking 5 09-17-2007 02:28 PM
Anyway to use rsync ssh without allowing root access? ifm Linux - Security 0 06-12-2002 01:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:34 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration