BackupPC-users

Re: [BackupPC-users] Unable to read 4 bytes

2014-11-07 15:22:37
Subject: Re: [BackupPC-users] Unable to read 4 bytes
From: Les Mikesell <lesmikesell AT gmail DOT com>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Fri, 7 Nov 2014 14:21:13 -0600
On Fri, Nov 7, 2014 at 1:58 PM, tschmid4 <tschmid4 AT utk DOT edu> wrote:
>
> I'd rather start from scratch at this point if it's possible.
> I've made a list of which servers can connect to others and for the most
> part, they can connect with a few stray disconnects.
>
> To start with a clean slate, would I SSH into the backup server and SSH to
> each Linux machine I wanted to connect to ?

Yes, being sure to su to the backuppc user on the backuppc server
first.  Doing something like 'ssh root@target id'  is a quick test
that both the host and user level keys are correct.

> Is there a process for deleting a specific line from each host file so the
> server will add the correct key info for each connection?

It's a text file, so any text editor will work.  I'd normally use vi where
numberG
will position you to the specified line number and
dd
will delete it.   But some people don't like vi's command-oriented syntax.

> I still can't quite wrap my head around the process because some of what the
> messages tell you are to 'Add the correct host key' ....well, which machine
> ?
>
> Add correct host key in /root/.ssh/known_hosts to get rid of this message.
> Offending key in ~/.ssh/known_hosts:1

The :number is the line number containing the host name/IP (which you
can easily see) and a mis-matching host key (which you can also see
but might not otherwise know is wrong).  You can also find this line
by searching for the hostname or IP involved.

> I know if I ever get it working it will be light a light bulb going off,
> but it's mighty dark right now with the servers not backing up....

If there is a 'wrong' entry in known_hosts matching the name or ip
that you used to connect, you get the error message.  If there is no
current match you get the prompt about accepting the new value.
Either of these will break backuppc's connection since it can't answer
the interactive prompt, so you have to connect once manually to get
the known_hosts entry updated.

If you get a password prompt it means you don't have the right user
public key in the authorized_keys file instead (or it has the wrong
owner/permissions) and you need to go back to the ssh-copy-id step.

Also, note that none of this really has anything to do with backuppc.
Ssh is generally useful for a lot of other things.

-- 
  Les Mikesell
     lesmikesell AT gmail DOT com

------------------------------------------------------------------------------
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/