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