This seems to be the one thing that I keep finding a way to mess up!
Last time, I made the mistake of using an ssh connection to the other
machine to avoid trotting back and forth between buildings. YOU
CAN’T DO THIS since the ssh session keys get in the way of the backuppc
key generation process. Once I figured this out, I was able to get my
Fedora 8 installation working properly again.
Since Fedora 8 will no longer receive support and for some reason I
can’t get Fedora 9 to install and work properly, I am moving my systems
to Ubuntu. I setup Ubuntu as a test system and have been playing with it
to get familiar before actually placing it into full (depend upon me)
service. I thought I was ready, so that’s how we got to here.
Everything has gone well up to the ssh keys generation process for
BackupPC. I can’t get it to work.
There are differences between Fedora and Ubuntu:
- Ubuntu uses sudo and
does not have root logon setup by default. I gave root a logon
password.
- Fedora did not give
backuppc user a password, but Ubuntu does.
- To perform work as
user backuppc, in Fedora as root I had to use the command ‘su -s
/bin/bash – backuppc’, but on Ubuntu as root, I think it is
simply ‘su backuppc’.
I worked through the key generation process (trotting back and forth
between machines) and all seemed to work exactly as it should all the way up to
the test of the result. When I enter the command
ssh –l root winserver whoami or ssh
–l root 192.168.1.101 whoami
it asks for root password.
Maybe someone has been here before and knows what I may be missing.
I captured a transcript of the commands as run and excerpts
follow. – ken
ken@Archiver:~$ sudo apt-get install rsync ssh openssh-server
-----download details deleted…
Setting up ssh (1:4.7p1-8ubuntu1.2) ...
root@Archiver:/var/lib/backuppc/.ssh# su backuppc
$ whoami
backuppc
$ cd /var/lib/backuppc/.ssh
$ ls -al
total 8
drwx------ 2 backuppc backuppc 4096 2009-01-08 13:25 .
drwxr-xr-x 9 backuppc backuppc 4096 2009-01-08 12:46 ..
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/var/lib/backuppc/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /var/lib/backuppc/.ssh/id_rsa.
Your public key has been saved in /var/lib/backuppc/.ssh/id_rsa.pub.
The key fingerprint is:
37:b9:95:9a:2a:1a:c0:f5:97:2a:ad:f8:3f:4d:66:69 backuppc@Archiver
$ cp id_rsa.pub BackupPC_id_rsa.pub
$ scp BackupPC_id_rsa.pub [email protected]:/root/.ssh/
The authenticity of host '192.168.1.101 (192.168.1.101)' can't be
established.
RSA key fingerprint is 71:a1:03:7d:fb:b9:87:1f:32:c7:a3:46:d0:81:2d:af.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.101' (RSA) to the list of known
hosts.
[email protected]'s password:
BackupPC_id_rsa.pub
100% 399 0.4KB/s
00:00
$ chmod -R go-rwx /var/lib/backuppc/.ssh
$ ssh -l root 192.168.1.101 whoami
[email protected]'s
password:
ç
Shouldn’t get this, but when entered
root
ç
The correct response.