Re: [rdiff-backup-users] Unable to backup due to remote system closing connection

2010-01-24 Thread Dominic Raferd

Hi Alex

There is a long thread about this issue at 
http://www.howtoforge.com/forums/showthread.php?t=3618. But the problem 
in the end seemed to be (in this case) that the user had generated the 
authorized_keys file with nano and had not switched off hard wrapping, 
so that when the file was saved nano broke up the line.


If you are using nano prior to version 2.1.11, use the -w switch on the 
command line:

nano -wc /mnt/backup/.ssh/authorized_keys

If you have the latest and greatest nano, you can use soft-wrapping 
which is *much* nicer:

nano -$c /mnt/backup/.ssh/authorized_keys

If you are using a different editor, have a look for the same problem 
i.e. what you intend as a single line is being saved as multiple lines


Dominic

Alex Pounds wrote:
Hello, 


I'm trying to set up backups from one machine (alan) to a backup host
(gertie) using rdiff-backup. Unfortunately, I haven't been able to get it
working. I'm sure I'm making a mistake somewhere, but reading the
documentation and experimentation hasn't got me any closer. Hopefully
someone on the mailing list will be able to help...

On the backup server, gertie, I created a user 'rdiffbackup'. From
/etc/passwd: 


rdiffbackup:x:118:1001:Automated backups:/mnt/backup:/bin/false

In /mnt/backup/.ssh/authorized_keys, I have a line like this (with no
linebreaks): 


command=/usr/bin/rdiff-backup -v9
--server,no-X11-forwarding,no-port-forwarding,no-pty ssh-rsa abde[long
ssh key]abcde r...@alan

On alan, I run the following command to perform the backup, and get the
following output: 


alan ~$ sudo rdiff-backup --print-statistics
--exclude-globbing-filelist /root/bin/excludes.txt /
rdiffbac...@gertie::/mnt/backup
Connection closed by 10.5.2.2
Fatal Error: Truncated header string (problem probably originated
remotely)

Couldn't start up the remote connection by executing

ssh -C rdiffbac...@gertie rdiff-backup --server

Remember that, under the default settings, rdiff-backup must be
installed in the PATH on the remote system.  See the man page for more
information on this.  This message may also be displayed if the remote
version of rdiff-backup is quite different from the local version
(1.2.8).


Both servers are running Ubuntu 9.10, and have rdiffbackup 1.2.8 on them.
Running the ssh command 'by hand' with the -vv option produces the
following debug output, after a straightforward auth procedure: 


debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Offering public key: /root/.ssh/id_rsa
debug2: we sent a publickey packet, wait for reply
debug1: Remote: Forced command: /usr/bin/rdiff-backup -v9 --server
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Port forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Server accepts key: pkalg ssh-rsa blen [num]
debug2: input_userauth_pk_ok: fp [fingerprint]
debug1: read PEM private key done: type RSA
debug1: Remote: Forced command: /usr/bin/rdiff-backup -v9 --server
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Port forwarding disabled.
debug1: Remote: Pty allocation disabled.
Connection closed by 10.5.2.2


Any suggestions as to what I've misconfigured, or how I can produce some
helpful logs/debugging output, are gratefully received. 



Many thanks, 

  



___
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki


Re: [rdiff-backup-users] Unable to backup due to remote system closing connection

2010-01-24 Thread Alex Pounds
On Sun, Jan 24, 2010 at 08:11:46AM +, Dominic Raferd wrote:
 There is a long thread about this issue at
 http://www.howtoforge.com/forums/showthread.php?t=3618. But the
 problem in the end seemed to be (in this case) that the user had
 generated the authorized_keys file with nano and had not switched
 off hard wrapping, so that when the file was saved nano broke up the
 line.

Thanks for the pointer, but that doesn't seem to be the problem in this
case: 

gertie ~$ sudo wc -l /mnt/backup/.ssh/authorized_keys
1 /mnt/backup/.ssh/authorized_keys

Catting the authorized_keys file with the -A option shows only one
end-of-line character, too. 

-- 
Alex Pounds (Creature)  .~. http://www.alexpounds.com/
/V\http://www.ethicsgirls.com/
   // \\
Variables won't; Constants aren't   /(   )\
   ^`~'^


___
rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki