Please note the new address for this forum : forum.excito.org. The old address redirects here but I don't know for how long. Thanks !
New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

RSync Backup Problems

Got problems with your B2 or B3? Share and get helped!
jovisuk
Posts: 65
Joined: 12 Sep 2010, 04:20

RSync Backup Problems

Post by jovisuk »

Hi Guys,

I'm having problems backing up one B3 to another using the RSync method, detailed here: http://forum.excito.net/viewtopic.php?t=415

Everything seems to be fine until I get to:

cat bubba-01-rsync-key.pub >> .ssh/authorized_keys

I've changed the "bubba-01" for my hostname of the bubba but everytime I do it, and I have tried numerous times, I get the same issues:

main-user@main-bubba:~$ cat backup-bubba-rsync-key.pub >> .ssh/authorized_keys
cat: backup-bubba-rsync-key.pub: No such file or directory

Does anyone have any ideas what I might be doing wrong?

Thanks, Joe
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: RSync Backup Problems

Post by Ubi »

1) what are the permissions on that authorized keys file?

2) did you try running the command with extra verbose or debug options enabled?

ubi
jovisuk
Posts: 65
Joined: 12 Sep 2010, 04:20

Re: RSync Backup Problems

Post by jovisuk »

Hi,

Excellent questions and I'd love to answer but I'm very new to this so don't really know, how can I tell what permissions are on a file?

Also, how do I run a command with extra verbose or debug options enabled??

Sorry for my complete ignorance, but trying to learn!

Thanks, Joe
jovisuk
Posts: 65
Joined: 12 Sep 2010, 04:20

Re: RSync Backup Problems

Post by jovisuk »

Ok so now I have done this whilst logged on as "su" on the main-bubba and entered the command:

cat .ssh/backup-bubba-rsync-key.pub >> .ssh/authorized_keys

and I get no errors, and when I go into the directory of .ssh and then do:

cat authorized_keys

I can see the data displayed the same as if I open the backup-bubba-rsync-key.pub file, but I am still being forced to type a password when connecting from the other Bubba???

HELP!
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: RSync Backup Problems

Post by Ubi »

first of all, if you want help on these things you have to show us the EXACT command you entered and also the EXACT error message. Never interpret the error for us.

* Anyway if you want verbose output of rsync use the -v switch. Read the man page for rsync for explanation. Maybe you have this switch already but you did not tell me

* For info on the permissions: do "ls -l" in the dir.
jovisuk
Posts: 65
Joined: 12 Sep 2010, 04:20

Re: RSync Backup Problems

Post by jovisuk »

Great thanks for your help Ubi.

I have copied and pasted the EXACT commands I've been using - usually directly from the guide I mentioned, with only my hostname swapped for the one in the guide.

The only time I got no errors was when I did:

cat .ssh/backup-bubba-rsync-key.pub >> .ssh/authorized_keys

instead of what it said in the guide was:

cat backup-bubba-rsync-key.pub >> .ssh/authorized_keys

So, (Maybe wrongly) I assumed that it had added the .pub key to the authorized_keys file. I then did:

cat authorized_keys

While in the .ssh directory and it displayed the same characters as when I did:

cat backup-bubba-rsync-key.pub

Again (Perhaps wrongly) I assumed this meant that the key had been copied into the authorized_keys file.

I then went back to my backup-bubba and tried:

ssh -i /home/backup-user/cron/backup-bubba-rsync-key [email protected] (I used IP address as hostnames werent working at the time)

It then still prompts me for a password to log onto the main-bubba / 192.168.1.100 which if I enter gains me access.

Not sure where I'm going wrong, is there the ability to print a log file of what I've been doing?

Thanks again for your superb help!
jovisuk
Posts: 65
Joined: 12 Sep 2010, 04:20

Re: RSync Backup Problems

Post by jovisuk »

Permissions within the .ssh directory:

main-user@main-bubba:~/.ssh$ ls -l
total 8
-rw-rw-rw- 1 main-user users 1228 Nov 4 12:46 authorized_keys
-rw-r--r-- 1 main-user users 614 Nov 4 11:51 backup-bubba-rsync-key.pub
main-user@main-bubba:~/.ssh$
jovisuk
Posts: 65
Joined: 12 Sep 2010, 04:20

Re: RSync Backup Problems

Post by jovisuk »

Hi,

I looked at the newer guide online in the wiki, and tried the following which is below, I have copied my entire session to here so you can see.

I logged onto the backup-bubba - tried to connect and got prompted for a password, so I did as the new guide suggests, and it appears to copy it to the main-bubba, but when I try to connect, I get prompted for a password AGAIN!!!!!!!!!!!!!!!!

I'm losing my mind, am I doing something blatantly wrong? Any help appreciated!

login as: backup-user
Using keyboard-interactive authentication.
Password:
Linux backup-bubba 2.6.35.4 #5 Tue Sep 7 16:06:15 CEST 2010 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Nov 4 11:30:32 2010 from 192.168.1.3
backup-user@backup-bubba:~$ ssh -i /home/backup-user/cron/backup-bubba-rsync-key main-user@main-bubba
Password:
Linux main-bubba 2.6.35.4 #5 Tue Sep 7 16:06:15 CEST 2010 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Nov 4 14:11:42 2010 from backup-bubba.localdomain
main-user@main-bubba:~$ exit
logout
Connection to main-bubba closed.
backup-user@backup-bubba:~$ scp ~/cron/backup-bubba-rsync-key.pub main-user@main-bubba:.ssh/authorized_keys
Password:
backup-bubba-rsync-key.pub 100% 614 0.6KB/s 00:00
backup-user@backup-bubba:~$ ssh -i /home/backup-user/cron/backup-bubba-rsync-key main-user@main-bubba
Password:
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: RSync Backup Problems

Post by Ubi »

what gives

Code: Select all

ls -l /home/backup-user/cron/backup-bubba-rsync-key
Last edited by Ubi on 04 Nov 2010, 11:06, edited 2 times in total.
jovisuk
Posts: 65
Joined: 12 Sep 2010, 04:20

Re: RSync Backup Problems

Post by jovisuk »

backup-user@backup-bubba:~$ ls -l /home/backup-user/cron/backup-bubba-rsync-key
-rw------- 1 backup-user users 668 Nov 4 11:49 /home/backup-user/cron/backup-bubba-rsync-key
backup-user@backup-bubba:~$
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: RSync Backup Problems

Post by Ubi »

and what gives

Code: Select all

ssh -ivvv /home/backup-user/cron/backup-bubba-rsync-key main-user@main-bubba
jovisuk
Posts: 65
Joined: 12 Sep 2010, 04:20

Re: RSync Backup Problems

Post by jovisuk »

backup-user@backup-bubba:~$ ssh -ivvv /home/backup-user/cron/backup-bubba-rsync-key main-user@main-bubba
Warning: Identity file vvv not accessible: No such file or directory.
ssh: Could not resolve hostname /home/backup-user/cron/backup-bubba-rsync-key: Name or service not known
backup-user@backup-bubba:~$ ssh -ivvv /home/backup-user/cron/backup-bubba-rsync-key [email protected]
Warning: Identity file vvv not accessible: No such file or directory.
ssh: Could not resolve hostname /home/backup-user/cron/backup-bubba-rsync-key: Name or service not known
backup-user@backup-bubba:~$

After it mentioning the hostname I tried with the IP address underneath - not sure what's going on as the hostnames should be resolving, I can still PING:

backup-user@backup-bubba:~$ ping main-bubba
PING main-bubba.localdomain (192.168.1.100) 56(84) bytes of data.
64 bytes from main-bubba.localdomain (192.168.1.100): icmp_req=1 ttl=64 time=0.268 ms
64 bytes from main-bubba.localdomain (192.168.1.100): icmp_req=2 ttl=64 time=0.204 ms
64 bytes from main-bubba.localdomain (192.168.1.100): icmp_req=3 ttl=64 time=0.235 ms
^C
--- main-bubba.localdomain ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 0.204/0.235/0.268/0.031 ms
backup-user@backup-bubba:~$
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: RSync Backup Problems

Post by Ubi »

damnit my mistake:

Code: Select all

ssh -v -v -v -i /home/backup-user/cron/backup-bubba-rsync-key main-user@main-bubba
do you have MSN by the way?
jovisuk
Posts: 65
Joined: 12 Sep 2010, 04:20

Re: RSync Backup Problems

Post by jovisuk »

I'll just install MSN, I have Skype, username: jhitsolutions

Results:


backup-user@backup-bubba:~$ ssh -v -v -v -i /home/backup-user/cron/backup-bubba-rsync-key main-user@main-bubba
OpenSSH_5.5p1 Debian-4, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to main-bubba [192.168.1.100] port 22.
debug1: Connection established.
debug3: Not a RSA1 key file /home/backup-user/cron/backup-bubba-rsync-key.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /home/backup-user/cron/backup-bubba-rsync-key type 2
debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
debug1: identity file /home/backup-user/cron/backup-bubba-rsync-key-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5p1 Debian-4
debug1: match: OpenSSH_5.5p1 Debian-4 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.5p1 Debian-4
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: [email protected],[email protected],ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,[email protected],zlib
debug2: kex_parse_kexinit: none,[email protected],zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,[email protected]
debug2: kex_parse_kexinit: none,[email protected]
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_setup: found hmac-md5
debug1: kex: server->client aes128-ctr hmac-md5 none
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 132/256
debug2: bits set: 496/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug3: check_host_in_hostfile: host main-bubba filename /home/backup-user/.ssh/known_hosts
debug3: check_host_in_hostfile: host main-bubba filename /home/backup-user/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 2
debug3: check_host_in_hostfile: host 192.168.1.100 filename /home/backup-user/.ssh/known_hosts
debug3: check_host_in_hostfile: host 192.168.1.100 filename /home/backup-user/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 1
debug1: Host 'main-bubba' is known and matches the RSA host key.
debug1: Found key in /home/backup-user/.ssh/known_hosts:2
debug2: bits set: 519/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/backup-user/cron/backup-bubba-rsync-key (0x2a072448)
debug1: Authentications that can continue: publickey,keyboard-interactive
debug3: start over, passed a different list publickey,keyboard-interactive
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/backup-user/cron/backup-bubba-rsync-key
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,keyboard-interactive
debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 1
Password:
debug3: packet_send2: adding 32 (len 23 padlen 9 extra_pad 64)
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 0
debug3: packet_send2: adding 48 (len 10 padlen 6 extra_pad 64)
debug1: Authentication succeeded (keyboard-interactive).
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug2: callback start
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug1: Sending environment.
debug3: Ignored env TERM
debug3: Ignored env SHELL
debug3: Ignored env SSH_CLIENT
debug3: Ignored env SSH_TTY
debug3: Ignored env USER
debug3: Ignored env LS_COLORS
debug3: Ignored env MAIL
debug3: Ignored env PATH
debug3: Ignored env PWD
debug3: Ignored env SHLVL
debug3: Ignored env HOME
debug3: Ignored env LOGNAME
debug3: Ignored env SSH_CONNECTION
debug3: Ignored env _
debug3: Ignored env OLDPWD
debug2: channel 0: request shell confirm 1
debug2: fd 3 setting TCP_NODELAY
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug2: channel 0: rcvd adjust 2097152
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0
Linux main-bubba 2.6.35.4 #5 Tue Sep 7 16:06:15 CEST 2010 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Nov 4 15:11:20 2010 from backup-bubba.localdomain
main-user@main-bubba:~$
jovisuk
Posts: 65
Joined: 12 Sep 2010, 04:20

Re: RSync Backup Problems

Post by jovisuk »

it prompted me for the password by the way as well,
Post Reply