[Touch-packages] [Bug 1830121] Re: rsync --rsync-path="sudo rsync" over ssh via pki fails due to protocol mismatch
I've discovered the problem was caused by -tt in the ssh options, which I picked up from somewhere as a step in debugging a prior issue. It works as expected once -tt is removed. Thanks anyway. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to rsync in Ubuntu. https://bugs.launchpad.net/bugs/1830121 Title: rsync --rsync-path="sudo rsync" over ssh via pki fails due to protocol mismatch Status in Ubuntu MATE: Invalid Status in rsync package in Ubuntu: Incomplete Bug description: rsync with remote sudo fails over ssh on Ubuntu Mate 18.04.2 rsync version 3.1.2 protocol version 31 - same on local and remote OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017 - same on local and remote I have checked for spurious output from .bashrc using $ ssh user@host /bin/true > out.dat which results in $ ls -l *.dat -rw-rw-r-- 1 user user 0 May 22 23:33 out.dat -- The [redacted] command is rsync -AEavvvogt --rsync-path="sudo rsync" --debug=CONNECT -e "ssh -i /home/xxx/.ssh/id_rsa -tt -v -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --exclude-from=/home/xxx/backup.exclude --delete --link-dest=../$lastdt /etc $dest/$dt; -- The [redacted] output is opening connection using: ssh -i /home/user/.ssh/id_rsa -tt -v -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -l user xxx "sudo rsync" --server -vvvlogDtpAre.iLsfxC --delete --link-dest ../20190506_021137 . /home/backups/xxx/20190522_232738 (20 args) OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug1: Connecting to xxx [192.168.1.120] port 22. debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: identity file /home/user/.ssh/id_rsa type 0 debug1: key_load_public: No such file or directory debug1: identity file /home/user/.ssh/id_rsa-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 debug1: match: OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 pat OpenSSH* compat 0x0400 debug1: Authenticating to xxx:22 as 'user' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key algorithm: ecdsa-sha2-nistp256 debug1: kex: server->client cipher: chacha20-poly1...@openssh.com MAC: compression: none debug1: kex: client->server cipher: chacha20-poly1...@openssh.com MAC: compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: xxx Warning: Permanently added 'xxx,192.168.1.120' (ECDSA) to the list of known hosts. debug1: rekey after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey after 134217728 blocks debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs= debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Offering public key: RSA SHA256:xxx /home/user/.ssh/id_rsa debug1: Server accepts key: xxx debug1: Authentication succeeded (publickey). Authenticated to xxx ([192.168.1.120]:22). debug1: channel 0: new [client-session] debug1: Requesting no-more-sessi...@openssh.com debug1: Entering interactive session. debug1: pledge: network debug1: client_input_global_request: rtype hostkeys...@openssh.com want_reply 0 debug1: tty_make_modes: no fd or tio debug1: Sending environment. debug1: Sending env LANG = en_GB.UTF-8 debug1: Sending command: sudo rsync --server -vvvlogDtpAre.iLsfxC --delete --link-dest ../20190506_021137 . /home/backups/xxx/20190522_232738 protocol version mismatch -- is your shell clean? (see the rsync man page for an explanation) rsync error: protocol incompatibility (code 2) at compat.c(178) [sender=3.1.2] [sender] _exit_cleanup(code=2, file=compat.c, line=178): about to call exit(2) /etc/sudoers contains userALL= NOPASSWD:/usr/bin/rsync ...which I have tried placing above (as is the default) and below lines beginning %admin and %sudo and the space in "ALL= NOPASSWD..." doesn't seem to make any difference I followed the instructions at https://www.digitalocean.com/community/tutorials/how-to-copy-files-with-rsync-over-ssh https://askubuntu.com/questions/719439/using-rsync-with-sudo-on-the-destination-machine - which worked on 16.04, so I wonder if there may be a bug, although grateful for any other suggestions. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu-mate/+bug/1830121/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.l
[Touch-packages] [Bug 1831101] Re: rsync with remote sudo fails over ssh/pki with protocol mismatch error
Not a bug. The problem seems to be -tt in the ssh options, which I had picked-up from somewhere as a possible solution, but https://bugzilla.redhat.com/show_bug.cgi?id=1019923 suggests rsync cannot be expected to work over ssh with -tt, albeit resulting there in a different error condition than I had encountered. Having corrected a remote path error, it seems to work as expected without -tt Thanks anyway for your help. ** Bug watch added: Red Hat Bugzilla #1019923 https://bugzilla.redhat.com/show_bug.cgi?id=1019923 -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to rsync in Ubuntu. https://bugs.launchpad.net/bugs/1831101 Title: rsync with remote sudo fails over ssh/pki with protocol mismatch error Status in rsync package in Ubuntu: Incomplete Bug description: rsync with remote sudo fails over ssh on Ubuntu Mate 18.04.2 rsync version 3.1.2 protocol version 31 - same on local and remote OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017 - same on local and remote I have checked for spurious output from .bashrc using $ ssh user@host /bin/true > out.dat which results in $ ls -l *.dat -rw-rw-r-- 1 user user 0 May 22 23:33 out.dat -- The [redacted] command is rsync -AEavvvogt --rsync-path="sudo rsync" --debug=CONNECT -e "ssh -i /home/xxx/.ssh/id_rsa -tt -v -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --exclude-from=/home/xxx/backup.exclude --delete --link-dest=../$lastdt /etc $dest/$dt -- The [redacted] output is opening connection using: ssh -i /home/user/.ssh/id_rsa -tt -v -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -l user xxx "sudo rsync" --server -vvvlogDtpAre.iLsfxC --delete --link-dest ../20190506_021137 . /home/backups/xxx/20190522_232738 (20 args) OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug1: Connecting to xxx [192.168.1.120] port 22. debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: identity file /home/user/.ssh/id_rsa type 0 debug1: key_load_public: No such file or directory debug1: identity file /home/user/.ssh/id_rsa-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 debug1: match: OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 pat OpenSSH* compat 0x0400 debug1: Authenticating to xxx:22 as 'user' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key algorithm: ecdsa-sha2-nistp256 debug1: kex: server->client cipher: MAC: compression: none debug1: kex: client->server cipher: MAC: compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: xxx Warning: Permanently added 'xxx,192.168.1.120' (ECDSA) to the list of known hosts. debug1: rekey after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey after 134217728 blocks debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs= debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Offering public key: RSA SHA256:xxx /home/user/.ssh/id_rsa debug1: Server accepts key: xxx debug1: Authentication succeeded (publickey). Authenticated to xxx ([192.168.1.120]:22). debug1: channel 0: new [client-session] debug1: Requesting debug1: Entering interactive session. debug1: pledge: network debug1: client_input_global_request: rtype want_reply 0 debug1: tty_make_modes: no fd or tio debug1: Sending environment. debug1: Sending env LANG = en_GB.UTF-8 debug1: Sending command: sudo rsync --server -vvvlogDtpAre.iLsfxC --delete --link-dest ../20190506_021137 . /home/backups/xxx/20190522_232738 protocol version mismatch -- is your shell clean? (see the rsync man page for an explanation) rsync error: protocol incompatibility (code 2) at compat.c(178) [sender=3.1.2] [sender] _exit_cleanup(code=2, file=compat.c, line=178): about to call exit(2) --- /etc/sudoers contains user ALL= NOPASSWD:/usr/bin/rsync ...which I have tried placing above (as is the default) and below lines beginning %admin and %sudo and the space in "ALL= NOPASSWD..." doesn't seem to make any difference I followed the instructions at https://www.digitalocean.com/community/tutorials/how-to-copy-files- with-rsync-over-ssh https://askubuntu.com/questions/719439/using-rsync-with-sudo-on-the- destination-machine ...which worked on 16.
[Touch-packages] [Bug 1831101] [NEW] rsync with remote sudo fails over ssh/pki with protocol mismatch error
Public bug reported: rsync with remote sudo fails over ssh on Ubuntu Mate 18.04.2 rsync version 3.1.2 protocol version 31 - same on local and remote OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017 - same on local and remote I have checked for spurious output from .bashrc using $ ssh user@host /bin/true > out.dat which results in $ ls -l *.dat -rw-rw-r-- 1 user user 0 May 22 23:33 out.dat -- The [redacted] command is rsync -AEavvvogt --rsync-path="sudo rsync" --debug=CONNECT -e "ssh -i /home/xxx/.ssh/id_rsa -tt -v -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --exclude-from=/home/xxx/backup.exclude --delete --link-dest=../$lastdt /etc $dest/$dt -- The [redacted] output is opening connection using: ssh -i /home/user/.ssh/id_rsa -tt -v -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -l user xxx "sudo rsync" --server -vvvlogDtpAre.iLsfxC --delete --link-dest ../20190506_021137 . /home/backups/xxx/20190522_232738 (20 args) OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug1: Connecting to xxx [192.168.1.120] port 22. debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: identity file /home/user/.ssh/id_rsa type 0 debug1: key_load_public: No such file or directory debug1: identity file /home/user/.ssh/id_rsa-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 debug1: match: OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 pat OpenSSH* compat 0x0400 debug1: Authenticating to xxx:22 as 'user' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key algorithm: ecdsa-sha2-nistp256 debug1: kex: server->client cipher: MAC: compression: none debug1: kex: client->server cipher: MAC: compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: xxx Warning: Permanently added 'xxx,192.168.1.120' (ECDSA) to the list of known hosts. debug1: rekey after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey after 134217728 blocks debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs= debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Offering public key: RSA SHA256:xxx /home/user/.ssh/id_rsa debug1: Server accepts key: xxx debug1: Authentication succeeded (publickey). Authenticated to xxx ([192.168.1.120]:22). debug1: channel 0: new [client-session] debug1: Requesting debug1: Entering interactive session. debug1: pledge: network debug1: client_input_global_request: rtype want_reply 0 debug1: tty_make_modes: no fd or tio debug1: Sending environment. debug1: Sending env LANG = en_GB.UTF-8 debug1: Sending command: sudo rsync --server -vvvlogDtpAre.iLsfxC --delete --link-dest ../20190506_021137 . /home/backups/xxx/20190522_232738 protocol version mismatch -- is your shell clean? (see the rsync man page for an explanation) rsync error: protocol incompatibility (code 2) at compat.c(178) [sender=3.1.2] [sender] _exit_cleanup(code=2, file=compat.c, line=178): about to call exit(2) --- /etc/sudoers contains user ALL= NOPASSWD:/usr/bin/rsync ...which I have tried placing above (as is the default) and below lines beginning %admin and %sudo and the space in "ALL= NOPASSWD..." doesn't seem to make any difference I followed the instructions at https://www.digitalocean.com/community/tutorials/how-to-copy-files-with- rsync-over-ssh https://askubuntu.com/questions/719439/using-rsync-with-sudo-on-the- destination-machine ...which worked on 16.04, so I wonder if there may be a bug, although grateful for any other suggestions, as I am unsure how to debug/investigate further ** Affects: rsync (Ubuntu) Importance: Undecided Status: New ** Tags: rsync ** Tags added: rsync -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to rsync in Ubuntu. https://bugs.launchpad.net/bugs/1831101 Title: rsync with remote sudo fails over ssh/pki with protocol mismatch error Status in rsync package in Ubuntu: New Bug description: rsync with remote sudo fails over ssh on Ubuntu Mate 18.04.2 rsync version 3.1.2 protocol version 31 - same on local and remote OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017 - same on local and remote I have checked for spurious output from .bashrc using $ ssh user@host /bin/true > out.dat which results in $ ls -l *.dat -rw-rw-r-- 1 user user 0 May 22 23:33 out.dat -- The [redacted] command is rsyn