在将rsync与各种命令行参数一起使用时,“连接意外关闭”

7_R3X

我想使用将iso文件从服务器复制到我的计算机rsync我使用了以下命令,但是出了点问题,我无法弄清楚是什么。我已经检查了密钥文件和原始文件的位置。

rsync --progress -avz -e 'ssh -v -i ./.ssh/new_keys node@<ip_address>' node@<ip_address>:~/ubuntu-16.04.1-server-amd64.iso ./Downloads/Ubuntu_Server.iso

这是由-v参数创建的日志

OpenSSH_7.3p1 Debian-1, OpenSSL 1.0.2h  3 May 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to <ip_address> [<ip_address>] port 22.
debug1: Connection established.
debug1: identity file ./.ssh/new_keys type 3
debug1: key_load_public: No such file or directory
debug1: identity file ./.ssh/new_keys-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.3p1 Debian-1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.1
debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.1 pat OpenSSH* compat 0x04000000
debug1: Authenticating to <ip_address>:22 as 'node'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:jXVkrQn/jcw9yrL/mQEvT0v2aXxRd9WZo7BjiO6i1eU
debug1: Host '<ip_address>' is known and matches the ECDSA host key.
debug1: Found key in /home/papagolf/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering ECDSA public key: ./.ssh/new_keys
debug1: Server accepts key: pkalg ecdsa-sha2-nistp521 blen 172
Enter passphrase for key './.ssh/new_keys': 
debug1: Authentication succeeded (publickey).
Authenticated to <ip_address> ([<ip_address>]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug1: Sending environment.
debug1: Sending env LANG = en_US.utf8
debug1: Sending command: <ip_address> rsync --server --sender -vlogDtprze.iLsfx . ~/ubuntu-16.04.1-server-amd64.iso
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype [email protected] reply 0
bash: <ip_address>: command not found
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
Transferred: sent 2580, received 2776 bytes, in 0.6 seconds
Bytes per second: sent 4231.2, received 4552.7
debug1: Exit status 127
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
汤玛士

您只需要以下命令。

rsync --progress -avz -e 'ssh -v -i ./.ssh/new_keys' node@<ip_address>:~/ubuntu-16.04.1-server-amd64.iso ./Downloads/Ubuntu_Server.iso

所以删除node@<ip_address>表格-e ssh '-v -i ...'

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

将Spring Boot配置文件与命令行参数一起使用

如何在Swift 3中将getopt与命令行参数一起使用?

将命令行参数与pytest --pyargs一起使用

根据命令行参数将字符串合并在一起。

在Bash脚本中将命令行参数和变量与sed一起使用

通过命令行输出将AWK模式与Variable一起使用

如何使用ffmpeg从命令行参数将.MP4视频与.WAV音频组合在一起以创建新的.MP4视频?

将 .next() 与 takeUntil 一起使用时的参数

curl将密码短语与命令行一起传递

如何在命令行中将jaxb2-annotate-plugin与XJC一起使用

如何在Shell命令行(-e swtich)中将gnuplot与awk一起使用

通过命令行将specs2.runner与自己的通知程序一起使用

在命令行中将SSH ForwardAgent和ProxyJump与IdentityFile一起使用

为什么jar无法与命令行一起使用?

将watch命令与包含引号的参数一起使用

将命令模式与参数一起使用

将Mocha与Babel一起使用时意外导入令牌

SyntaxError:将lodash与Nuxt一起使用时,意外的令牌导出

将Javac与String []一起使用时发生意外错误

将工厂模式与接受各种参数的派生类一起使用

将MySQL连接器与Python一起使用时SSL连接错误

将net-ssh与可与ssh命令一起使用的选项一起使用时,ConnectionTimeout错误?

将 HttpServlet 与 JAVA 一起使用时出现关闭错误

使用POCO上传文件-SSL连接意外关闭异常

将-exec {} ls与find命令一起使用时,权限被拒绝

当将exec与&一起使用时,最终命令不会运行

Django-将命名URL与参数一起使用时出现NoReverseMatch错误

将参数传递给命令行以进行连接,并在建立连接后在同一命令中传递另一个参数

使用Ansible将命令行参数传递给Docker