Setup of ssh transport for amrecover restores

This article is for Amanda Enterprise (AE)

From the Client(copper.zmanda.com):

  • Make sure you have the files below in the "/var/lib/amanda/.ssh" directory
# ls -al /var/lib/amanda/.ssh

-rw-------1 root root 1675 Jul 28 15:12 id_rsa_amrecover -rw------- 1 root root 393 Jul 28 15:12 id_rsa_amrecover.pub
  • Copy the id_rsa_amrecover.pub key to the server
    As root:
# scp /var/lib/amanda/.ssh/id_rsa_amrecover.pub root@quartz.zmanda.com:~amandabackup/.ssh/amrecover.pub.tmp

root@quartz.zmanda.com's password:
id_rsa_amrecover.pub 100% 221 0.2KB/s 00:00
  • Edit the /etc/amanda/amanda-client.conf
conf "sshbackup" # your config name on the server
index_server "quartz.zmanda.com" # your amindexd server
tape_server "quartz.zmanda.com" # your amidxtaped server
#tapedev "" # your tape device
auth "ssh"
# your ssh keys file if you use ssh auth
ssh_keys "/var/lib/amanda/.ssh/id_rsa_amrecover"
  • Ssh to the server from the client, enter "Yes" to be added to list of known hosts and hit "Ctrl-C"
    As amandabackup:
# ssh quartz.zmanda.com

The authenticity of host 'quartz.zmanda.com (192.168.10.197)' can't be established.
RSA key fingerprint is c9:02:da:42:16:0f:da:c7:a0:e1:f2:53:25:a7:6c:8f.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'quartz.zmanda.com,192.168.10.197' (RSA) to the list of known hosts.
amandabackup@quartz.zmanda.com's password:

From the Server(quartz.zmanda.com):

  • Append the amrecover.pub key to the authorized_keys on the server
    As root:
# cd /var/lib/amanda/.ssh
# cat amrecover.pub.tmp >> authorized_keys
# rm amrecover.pub.tmp
# chown amandabackup:disk authorized_keys
# chmod 600 authorized_keys

If the client is 64 bit the following steps are required for it to work on versions 3.3.9 and prior
# mkdir -p /usr/lib64/amanda/
# ln -s /usr/lib/amanda/amandad /usr/lib64/amanda/amandad

From the Client(copper.zmanda.com):

  • Test amrecover using ssh authentication
    As root:
# amrecover

AMRECOVER Version 3.x. Contacting server on quartz.zmanda.com ...
220 quartz AMANDA index server (3.x) ready.
Setting restore date to today (2006-09-08)
200 Working date set to 2006-09-08.
200 Config set to sshbackup.
501 Host copper is not in your disklist.
Trying host copper.zmanda.com ...
200 Dump host set to copper.zmanda.com.
Use the setdisk command to choose dump disk to recover
  • If connection was established the setup is completed