Amanda 使用 SSH 进行备份时客户端和本地主机均失败

Amanda 使用 SSH 进行备份时客户端和本地主机均失败

我正在尝试让 Amanda 使用 SSH 身份验证。在我将其安装在服务器上并使用硬盘作为磁带进行基本配置后,我就可以启动并运行它,尽管没有客户端支持。但至少我在本地计算机上获得了备份。

然后我想让它与 SSH 和 ssh-keys 一起工作。有一件事让我很烦恼,那就是我的本地备份不再起作用了:

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)

是的,我知道我有两个本地主机地址,但我也想确保这不是名称错误。

如上所示,另一部分是远程客户端上的 EOF 错误。所有内容都在同一个网络中,并且所有 VM 都位于同一个主机服务器上。对于我使用的用户,SSH 是双向工作的。而且我还看到了所有权限。以下是我的 amcheck 日志的示例:

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

配置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"
}

配置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

从客户端登录:

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

在阅读了有关此问题的指南和论坛后,我仍一无所获。希望这里有人能提供一些线索。

答案1

那么,问题是否出在服务器本身缺少 ssh 密钥?如果您遇到的是这个问题,请将其标记为已解决,以便其他人可以从您的经验中受益。

相关内容