Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to get Amanda working with SSH auth. After I installed it on a server and did a basic configuration with harddisk as tape, I got it up and running, no client support though. But I did get backups on my localmachine at least.

Then I wanted to get it working with SSH, and ssh-keys. One thing that is bothering me is that my local backups do not work anymore:

backup@backup-test:~$ amcheck DailySet1
Amanda Tape Server Host Check
-----------------------------
Holding disk /dumps/: 144007168 kB disk space available, using 144007168 kB
found in slot 2: volume 'DailySet1-02'
slot 2: volume 'DailySet1-02' is still active and cannot be overwritten
found in slot 3: volume 'DailySet1-03'
slot 3: volume 'DailySet1-03' is still active and cannot be overwritten
found in slot 4: volume 'DailySet1-04'
slot 4: volume 'DailySet1-04'
Will write to volume 'DailySet1-04' in slot 4.
NOTE: skipping tape-writable test
NOTE: info dir /etc/amanda/DailySet1/curinfo/localhost/_etc_xinetd.d_ does not exist
NOTE: it will be created on the next run.
NOTE: index dir /etc/amanda/DailySet1/index/localhost/_etc_xinetd.d_ does not exist
NOTE: it will be created on the next run.
NOTE: host info dir /etc/amanda/DailySet1/curinfo/10.0.10.17 does not exist
NOTE: it will be created on the next run.
NOTE: index dir /etc/amanda/DailySet1/index/10.0.10.17 does not exist
NOTE: it will be created on the next run.
NOTE: host info dir /etc/amanda/DailySet1/curinfo/10.0.10.19 does not exist
NOTE: it will be created on the next run.
NOTE: index dir /etc/amanda/DailySet1/index/10.0.10.19 does not exist
NOTE: it will be created on the next run.
Server check took 2.473 seconds
Warning: Permanently added '127.0.0.1' (ECDSA) to the list of known hosts.
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
Permission denied (publickey,password).
*****************************************************************************

                            NOTICE TO USERS

     WARNING! The use of this system is restricted to authorized users.

       All information and communications on this system are subject
             to review, monitoring and recording at any time,
           without notice or premission. Users should have no
                       expectation of privacy.

*****************************************************************************
Permission denied (publickey,password).
*****************************************************************************

                            NOTICE TO USERS

     WARNING! The use of this system is restricted to authorized users.

       All information and communications on this system are subject
             to review, monitoring and recording at any time,
           without notice or premission. Users should have no
                       expectation of privacy.

*****************************************************************************
Permission denied (publickey,password).

Amanda Backup Client Hosts Check
--------------------------------
WARNING: 127.0.0.1: selfcheck request failed: EOF on read from 127.0.0.1
WARNING: localhost: selfcheck request failed: EOF on read from localhost
WARNING: 10.0.10.19: selfcheck request failed: EOF on read from 10.0.10.19
WARNING: 10.0.10.17: selfcheck request failed: EOF on read from 10.0.10.17
Client check: 4 hosts checked in 0.457 seconds.  4 problems found.

(brought to you by Amanda 3.3.0)

Yes I know I got two localhost addresses but I wanted too make sure that is wasn't an error in name.

The other part as you see above is the EOF error on remote clients. Everything is in the same network and are all VM's on the same host-server. SSH is working both ways for the user I use. And what I've seen all permissions also. Here are a sample of my amcheck log:

Sun Apr 28 17:01:27 2013: amcheck: pid 30886 ruid 0 euid 34 version 3.3.0: start at Sun Apr 28 17:01:27 2013
Sun Apr 28 17:01:27 2013: amcheck: pid 30886 ruid 0 euid 34 version 3.3.0: rename at Sun Apr 28 17:01:27 2013
Sun Apr 28 17:01:27 2013: amcheck-clients: security_getdriver(name=ssh) returns 0x7f47b4fb9840
Sun Apr 28 17:01:27 2013: amcheck-clients: security_handleinit(handle=0x8fbb80, driver=0x7f47b4fb9840 (SSH))
Sun Apr 28 17:01:27 2013: amcheck-clients: security_streaminit(stream=0x901c80, driver=0x7f47b4fb9840 (SSH))
Sun Apr 28 17:01:27 2013: amcheck-clients: exec: /usr/bin/ssh SSH_OPTIONS -l backup -p 22 -i /var/backups/.ssh/id_rsa 127.0.0.1 /usr/lib/amanda/amandad -auth=ssh
Sun Apr 28 17:01:27 2013: amcheck-clients: tcpm_send_token: data is still flowing
Sun Apr 28 17:01:27 2013: amcheck-clients: security_getdriver(name=ssh) returns 0x7f47b4fb9840
Sun Apr 28 17:01:27 2013: amcheck-clients: security_handleinit(handle=0x8fd9f0, driver=0x7f47b4fb9840 (SSH))
Sun Apr 28 17:01:27 2013: amcheck-clients: security_streaminit(stream=0x909ce0, driver=0x7f47b4fb9840 (SSH))
Sun Apr 28 17:01:27 2013: amcheck-clients: exec: /usr/bin/ssh SSH_OPTIONS -l backup -p 22 -i /var/backups/.ssh/id_rsa localhost /usr/lib/amanda/amandad -auth=ssh
Sun Apr 28 17:01:27 2013: amcheck-clients: tcpm_send_token: data is still flowing
Sun Apr 28 17:01:27 2013: amcheck-clients: security_getdriver(name=ssh) returns 0x7f47b4fb9840
Sun Apr 28 17:01:27 2013: amcheck-clients: security_handleinit(handle=0x8fe5f0, driver=0x7f47b4fb9840 (SSH))
Sun Apr 28 17:01:27 2013: amcheck-server: Spawning "/usr/lib/amanda/amcheck-device /usr/lib/amanda/amcheck-device DailySet1" in pipeline
Sun Apr 28 17:01:27 2013: amcheck-clients: security_streaminit(stream=0x911d40, driver=0x7f47b4fb9840 (SSH))
Sun Apr 28 17:01:27 2013: amcheck-clients: exec: /usr/bin/ssh SSH_OPTIONS -l backup -p 22 -i /var/backups/.ssh/id_rsa 10.0.10.17 /usr/lib/amanda/amandad -auth=ssh
Sun Apr 28 17:01:27 2013: amcheck-clients: tcpm_send_token: data is still flowing
Sun Apr 28 17:01:27 2013: amcheck-clients: security_getdriver(name=ssh) returns 0x7f47b4fb9840
Sun Apr 28 17:01:27 2013: amcheck-clients: security_handleinit(handle=0x8ff420, driver=0x7f47b4fb9840 (SSH))
Sun Apr 28 17:01:27 2013: amcheck-clients: security_streaminit(stream=0x919da0, driver=0x7f47b4fb9840 (SSH))
Sun Apr 28 17:01:27 2013: amcheck-clients: exec: /usr/bin/ssh SSH_OPTIONS -l backup -p 22 -i /var/backups/.ssh/id_rsa 10.0.10.19 /usr/lib/amanda/amandad -auth=ssh
Sun Apr 28 17:01:27 2013: amcheck-clients: tcpm_send_token: data is still flowing
Sun Apr 28 17:01:27 2013: amcheck-clients: security_stream_seterr(0x901c80, SOCKET_EOF)
Sun Apr 28 17:01:27 2013: amcheck-clients: security_seterror(handle=0x8fbb80, driver=0x7f47b4fb9840 (SSH) error=EOF on read from 127.0.0.1)
Sun Apr 28 17:01:27 2013: amcheck-clients: security_close(handle=0x8fbb80, driver=0x7f47b4fb9840 (SSH))
Sun Apr 28 17:01:27 2013: amcheck-clients: security_stream_close(0x901c80)
Sun Apr 28 17:01:27 2013: amcheck-clients: security_stream_seterr(0x909ce0, SOCKET_EOF)
Sun Apr 28 17:01:27 2013: amcheck-clients: security_seterror(handle=0x8fd9f0, driver=0x7f47b4fb9840 (SSH) error=EOF on read from localhost)
Sun Apr 28 17:01:27 2013: amcheck-clients: security_close(handle=0x8fd9f0, driver=0x7f47b4fb9840 (SSH))
Sun Apr 28 17:01:27 2013: amcheck-clients: security_stream_close(0x909ce0)
Sun Apr 28 17:01:27 2013: amcheck-clients: security_stream_seterr(0x919da0, SOCKET_EOF)
Sun Apr 28 17:01:27 2013: amcheck-clients: security_seterror(handle=0x8ff420, driver=0x7f47b4fb9840 (SSH) error=EOF on read from 10.0.10.19)
Sun Apr 28 17:01:27 2013: amcheck-clients: security_close(handle=0x8ff420, driver=0x7f47b4fb9840 (SSH))
Sun Apr 28 17:01:27 2013: amcheck-clients: security_stream_close(0x919da0)
Sun Apr 28 17:01:27 2013: amcheck-clients: security_stream_seterr(0x911d40, SOCKET_EOF)
Sun Apr 28 17:01:27 2013: amcheck-clients: security_seterror(handle=0x8fe5f0, driver=0x7f47b4fb9840 (SSH) error=EOF on read from 10.0.10.17)
Sun Apr 28 17:01:27 2013: amcheck-clients: security_close(handle=0x8fe5f0, driver=0x7f47b4fb9840 (SSH))
Sun Apr 28 17:01:27 2013: amcheck-clients: security_stream_close(0x911d40)
Sun Apr 28 17:01:29 2013: amcheck-server: userbad: 0
Sun Apr 28 17:01:29 2013: amcheck-server: confbad: 0
Sun Apr 28 17:01:29 2013: amcheck-server: tapebad: 0
Sun Apr 28 17:01:29 2013: amcheck-server: disklow: 0
Sun Apr 28 17:01:29 2013: amcheck-server: logbad: 0
Sun Apr 28 17:01:29 2013: amcheck-server: infobad: 0
Sun Apr 28 17:01:29 2013: amcheck-server: indexbad: 0
Sun Apr 28 17:01:29 2013: amcheck-server: pgmbad: 0
Sun Apr 28 17:01:29 2013: amcheck: pid 30886 finish time Sun Apr 28 17:01:29 2013

Config amanda.conf:

org             "DailySet1"  # your organization name for reports
mailto          "root@localhost"  # space separated list of operators at your site
dumpuser        "backup"       # the user to run dumps under

logdir   "/etc/amanda/DailySet1/logs"           # log directory
infofile "/etc/amanda/DailySet1/curinfo"        # database filename
indexdir "/etc/amanda/DailySet1/index"          # index directory
tapelist "/etc/amanda/DailySet1/tapelist"       # list of used tapes

tapecycle 9 tapes
tapetype DISK
tpchanger "chg-disk"
changerfile "/etc/amanda/DailySet1/changer" # needed by amlabel
tapedev "file:/space/vtapes/DailySet1/slots"

define tapetype DISK {
  comment "Backup to HD"
  length 5 gbytes
}

# comment holding disk section if needed
holdingdisk hd1 {
  directory "/dumps/"
}

# to be used by any other dumptype
define dumptype global {
  comment "Global definitions"
  index yes
  record yes
  auth "ssh"
  ssh_keys "/var/backups/.ssh/id_rsa"
  client_username "backup"
}

define dumptype daily {
  global
  comment "daily dumptype"
  compress client fast
  program "GNUTAR"
  strategy standard
  priority high
  exclude list "/etc/amanda/DailySet1/global-debian-exclude.list"
}

Config amandahosts:

10.0.0.129 backup amindexd amidxtaped
10.0.0.129 backup amdump
localhost backup amindexd amidxtaped
localhost backup amdump
10.0.10.17 backup amindexd amidxtaped
10.0.10.17 backup amdump
10.0.10.19 backup amindexd amidxtaped
10.0.10.19 backup amdump

Log from client:

Sun Apr 28 17:01:27 2013: amandad: pid 32239 ruid 34 euid 34 version 3.3.0: start at   Sun Apr 28 17:01:27 2013
Sun Apr 28 17:01:27 2013: amandad: "/etc/amanda/amanda-client.conf", line 2: a quoted string is expected
Sun Apr 28 17:01:27 2013: amandad: "/etc/amanda/amanda-client.conf", line 2: end of line is expected

I got no clue after reading guides and forums for this problem. Hopefully someone here might have a clue.

share|improve this question
    
I am not familiar with Amanda configuration, but when you are configuring ssh, did you make the local backups done via ssh (i.e., the server ssh'ing to itself to run the backup) ? If yes, did you put the public ssh key into your authorized keys file on the local server ? –  MelBurslan Apr 29 '13 at 2:42
    
Thx, I over looked that part. It does ssh it self... –  Patrik Apr 29 '13 at 6:53
    
What's in your sshd logs? –  Jenny D Apr 29 '13 at 16:53

1 Answer 1

up vote 0 down vote accepted

So, was the problem with missing ssh keys on the server itself ? If your problem was that, please mark it resolved, so that others can benefit from your experience.

share|improve this answer
    
It's was missing it's own public key, so ssh localhost didn't work. Also the "quoted string" error was solved by set quotes around the IP addresses. Not what I thought was needed. And last, can you mark it solved on a comment? I sure can't... –  Patrik May 2 '13 at 6:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.