Gentoo Archives: gentoo-user

From: Michael Orlitzky <michael@××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Finalizing my backup system
Date: Wed, 06 Oct 2010 19:47:45
Message-Id: 4CACD22E.1080104@orlitzky.com
In Reply to: Re: [gentoo-user] Finalizing my backup system by Grant
1 On 10/06/2010 01:40 PM, Grant wrote:
2 >>> I'm using backupninja to backup data from my laptop, desktop, and
3 >>> remote server onto a remote desktop system. backupninja is very
4 >>> simple and is really just an interface to a few other programs
5 >>> including rdiff-backup. I'm not worried about a good restore method
6 >>> for now, I want to focus on keeping it simple and protecting my data.
7 >>> This is the first time I've set up a real backup system and I'd love
8 >>> to get some advice from you guys. I've got a few questions.
9 >>>
10 >>> 1. This is the first time I've used passwordless SSH keys. root on
11 >>> each system being backed up logs into the remote desktop as a normal
12 >>> user to store the backups. Is this pretty safe? I suppose if root is
13 >>> compromised on any of the three systems being backed up (via physical
14 >>> access or otherwise), the remote desktop will also be compromised as a
15 >>> normal user. Maybe that normal user should be extraordinarily
16 >>> unprivileged?
17 >>
18 >> You can limit SSH access to only certain commands. On the remote desktop
19 >> machine, you probably had to add an entry to the SSH authorized_keys
20 >> file. You can prefix that line with the command that the user is allowed
21 >> to run. For example (I use rdiff-backup too):
22 >>
23 >> command="/usr/bin/rdiff-backup --server",no-pty,no-port-forwarding
24 >> ssh-rsa <big_ugly_key>
25 >
26 > I tried both that and simplified versions of it but it seems to
27 > prevent the login from working. It hangs on the following command,
28 > which works if I don't add the above:
29 >
30 > ssh -o PasswordAuthentication=no 1.2.3.4 -l user 'echo -n 1'
31
32 That's the point? You can't log in (run /bin/bash) or do anything except
33 the command listed in the authorized_keys file.
34
35
36 > Should it be working? I noticed I have ssh-dss instead of your ssh-rsa.
37
38 That's just the key type, doesn't matter.

Replies

Subject Author
Re: [gentoo-user] Finalizing my backup system Grant <emailgrant@×××××.com>