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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-12-2014, 10:46 PM
|
#1
|
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:
|
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.
|
|
|
02-13-2014, 05:49 PM
|
#2
|
Senior Member
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824
|
|
|
|
02-13-2014, 07:07 PM
|
#3
|
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:
|
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.
|
|
|
02-14-2014, 10:20 AM
|
#4
|
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:
|
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.
|
|
|
All times are GMT -5. The time now is 07:34 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|