简体   繁体   English

重复性取决于“ ssh:切换到新密钥...”

[英]duplicity hangs on “ssh: Switch to new keys …”

I would like to backup a local directory to a remote server using duplicity 0.7.06 (installed via apt on Ubuntu 16.04.5 LTS). 我想使用重复性0.7.06(通过apt在Ubuntu 16.04.5 LTS上安装)将本地目录备份到远程服务器。 A user account with ~/.ssh/authorized_keys file is set up on the remote server. 在远程服务器上设置了具有~/.ssh/authorized_keys文件的用户帐户。

The duplicity command line is as follows: 双重性命令行如下:

duplicity full --verbosity debug /local/folder scp://remoteuser@remotehost/backup

The debug output of duplicity is: 双重性的调试输出为:

Using archive dir: /foo/bar/.cache/duplicity/bedacf3ab67835c3d614d3773c672c53
Using backup name: bedacf3ab67835c3d614d3773c672c53
Import of duplicity.backends.azurebackend Succeeded
Import of duplicity.backends.b2backend Succeeded
Import of duplicity.backends.botobackend Succeeded
Import of duplicity.backends.cfbackend Succeeded
Import of duplicity.backends.copycombackend Succeeded
Import of duplicity.backends.dpbxbackend Succeeded
Import of duplicity.backends.gdocsbackend Succeeded
Import of duplicity.backends.giobackend Succeeded
Import of duplicity.backends.hsibackend Succeeded
Import of duplicity.backends.hubicbackend Succeeded
Import of duplicity.backends.imapbackend Succeeded
Import of duplicity.backends.lftpbackend Succeeded
Import of duplicity.backends.localbackend Succeeded
Import of duplicity.backends.megabackend Succeeded
Import of duplicity.backends.multibackend Succeeded
Import of duplicity.backends.ncftpbackend Succeeded
Import of duplicity.backends.onedrivebackend Succeeded
Import of duplicity.backends.par2backend Succeeded
Import of duplicity.backends.pydrivebackend Succeeded
Import of duplicity.backends.rsyncbackend Succeeded
Import of duplicity.backends.ssh_paramiko_backend Succeeded
Import of duplicity.backends.ssh_pexpect_backend Succeeded
Import of duplicity.backends.swiftbackend Succeeded
Import of duplicity.backends.sxbackend Succeeded
Import of duplicity.backends.tahoebackend Succeeded
Import of duplicity.backends.webdavbackend Succeeded
ssh: starting thread (client mode): 0x5e398850L
ssh: Local version/idstring: SSH-2.0-paramiko_1.16.0
ssh: Remote version/idstring: SSH-2.0-OpenSSH_7.4p1 Debian-10+deb9u3
ssh: Connected (version 2.0, client OpenSSH_7.4p1)
ssh: kex algos:[u'curve25519-sha256', u'curve25519-sha256@libssh.org', u'ecdh-sha2-nistp256', u'ecdh-sha2-nistp384', u'ecdh-sha2-nistp521', u'diffie-hellman-group-exchange-sha256', u'diffie-hellman-group16-sha512', u'diffie-hellman-group18-sha512', u'diffie-hellman-group14-sha256', u'diffie-hellman-group14-sha1'] server key:[u'ssh-rsa', u'rsa-sha2-512', u'rsa-sha2-256', u'ecdsa-sha2-nistp256', u'ssh-ed25519'] client encrypt:[u'chacha20-poly1305@openssh.com', u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'aes128-gcm@openssh.com', u'aes256-gcm@openssh.com'] server encrypt:[u'chacha20-poly1305@openssh.com', u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'aes128-gcm@openssh.com', u'aes256-gcm@openssh.com'] client mac:[u'umac-64-etm@openssh.com', u'umac-128-etm@openssh.com', u'hmac-sha2-256-etm@openssh.com', u'hmac-sha2-512-etm@openssh.com', u'hmac-sha1-etm@openssh.com', u'umac-64@openssh.com', u'umac-128@openssh.com', u'hmac-sha2-256', u'hmac-sha2-512', u'hmac-sha1'] server mac:[u'umac-64-etm@openssh.com', u'umac-128-etm@openssh.com', u'hmac-sha2-256-etm@openssh.com', u'hmac-sha2-512-etm@openssh.com', u'hmac-sha1-etm@openssh.com', u'umac-64@openssh.com', u'umac-128@openssh.com', u'hmac-sha2-256', u'hmac-sha2-512', u'hmac-sha1'] client compress:[u'none', u'zlib@openssh.com'] server compress:[u'none', u'zlib@openssh.com'] client lang:[u''] server lang:[u''] kex follows?False
ssh: Kex agreed: diffie-hellman-group-exchange-sha256
ssh: Cipher agreed: aes128-ctr
ssh: MAC agreed: hmac-sha2-256
ssh: Compression agreed: none
ssh: Got server p (2048 bits)
ssh: kex engine KexGexSHA256 specified hash_algo <built-in function openssl_sha256>
/usr/lib/python2.7/dist-packages/Crypto/Cipher/blockalgo.py:141: FutureWarning: CTR mode needs counter parameter, not IV
  self._cipher = factory.new(key, *args, **kwargs)
ssh: Switch to new keys ...

After waiting for a while, one more line appears: 等待一会儿后,又出现一行:

ssh: EOF in transport thread

I can manually connect via SSH to the remote server without specifying a password using: 我可以使用SSH手动连接到远程服务器,而无需使用以下命令指定密码:

ssh remoteuser@remotehost

I can also copy files via scp without specifying a password: 我也可以通过scp复制文件而无需指定密码:

scp /some/file remoteuser@remotehost:/home/remoteuser/backup

So this seems to be a problem with duplicity or paramiko. 因此,这似乎是双重性或paramiko问题。

According to the "A note on SSH backends" manual section, I tried various SSH backends in the duplicity command line: 根据“关于SSH后端的说明”手册部分,我在duplicity命令行中尝试了各种SSH后端:

paramiko+scp paramiko + scp

Results in the problem described above. 导致上述问题。

paramiko+sftp paramiko + sftp

Results in the problem described above. 导致上述问题。

pexpect+scp pexpect + scp

ImportError: No module named pexpect

pexpect+sftp pexpect + sftp

ImportError: No module named pexpect

lftp+scp: lftp + scp:

This works after installing lftp , however, it requires password authentication and the authorized key does not work as intended. 安装lftp ,此方法有效,但是,它需要密码认证,并且授权密钥无法按预期工作。

paramiko 1.16 and duplicity 0.7.06 are quite old. paramiko 1.16和duplicity 0.7.06相当老。 try to upgrade to the latest greatest (paramiko 1.18.x or 2.4.x and duplicity 0.7.18.x) and see if the issue resolves. 尝试升级到最新版本(paramiko 1.18.x或2.4.x以及重复性0.7.18.x),看看问题是否解决。 smells like a paramiko issue. 闻起来像个paramiko问题。

if not, install python-pexpect and use the ssh backend utilizing the openssh binaries, that should work if it is working on the command line fine. 如果没有,请安装python-pexpect并通过openssh二进制文件使用ssh后端,如果它在命令行上正常运行,则应该可以正常工作。

..ede/duply.net ..ede / duply.net

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM