I want to copy an iso file from the server to my computer using rsync. I used the following command but something is wrong and I can't figure out what. I've checked the location of the key file and original file.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.isoThis is the log created by -v parameter.OpenSSH_7.3p1 Debian-1, OpenSSL 1.0.2h  3 May 2016debug1: Reading configuration data /etc/ssh/ssh_configdebug1: /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 3debug1: key_load_public: No such file or directorydebug1: identity file ./.ssh/new_keys-cert type -1debug1: Enabling compatibility mode for protocol 2.0debug1: Local version string SSH-2.0-OpenSSH_7.3p1 Debian-1debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.1debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.1 pat OpenSSH* compat 0x04000000debug1: Authenticating to <ip_address>:22 as 'node'debug1: SSH2_MSG_KEXINIT sentdebug1: SSH2_MSG_KEXINIT receiveddebug1: kex: algorithm: curve25519-sha256@libssh.orgdebug1: kex: host key algorithm: ecdsa-sha2-nistp256debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: nonedebug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: nonedebug1: expecting SSH2_MSG_KEX_ECDH_REPLYdebug1: Server host key: ecdsa-sha2-nistp256 SHA256:jXVkrQn/jcw9yrL/mQEvT0v2aXxRd9WZo7BjiO6i1eUdebug1: Host '<ip_address>' is known and matches the ECDSA host key.debug1: Found key in /home/papagolf/.ssh/known_hosts:1debug1: rekey after 134217728 blocksdebug1: SSH2_MSG_NEWKEYS sentdebug1: expecting SSH2_MSG_NEWKEYSdebug1: rekey after 134217728 blocksdebug1: SSH2_MSG_NEWKEYS receiveddebug1: SSH2_MSG_EXT_INFO receiveddebug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>debug1: SSH2_MSG_SERVICE_ACCEPT receiveddebug1: Authentications that can continue: publickeydebug1: Next authentication method: publickeydebug1: Offering ECDSA public key: ./.ssh/new_keysdebug1: Server accepts key: pkalg ecdsa-sha2-nistp521 blen 172Enter 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 no-more-sessions@openssh.comdebug1: Entering interactive session.debug1: pledge: networkdebug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0debug1: Sending environment.debug1: Sending env LANG = en_US.utf8debug1: Sending command: <ip_address> rsync --server --sender -vlogDtprze.iLsfx . ~/ubuntu-16.04.1-server-amd64.isodebug1: client_input_channel_req: channel 0 rtype exit-status reply 0debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0bash: <ip_address>: command not founddebug1: channel 0: free: client-session, nchannels 1debug1: fd 0 clearing O_NONBLOCKdebug1: fd 1 clearing O_NONBLOCKTransferred: sent 2580, received 2776 bytes, in 0.6 secondsBytes per second: sent 4231.2, received 4552.7debug1: Exit status 127rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
'connection unexpectedly closed' while using rsync with various command line arguments
ssh;rsync
You only need a command as follows.rsync --progress -avz -e 'ssh -v -i ./.ssh/new_keys' node@<ip_address>:~/ubuntu-16.04.1-server-amd64.iso ./Downloads/Ubuntu_Server.isoSo remove the node@<ip_address> form -e ssh '-v -i ...'