[opensuse] Rsync over SSH with diffie-hellman-group1-sha1
Hi all. I have a question regarding SSH options with Rsync. I have an old NAS which I want to use to rsync some very large files to. I set up a user and a folder on the NAS. I can connect easily via sftp, although I need to specify an algorithm as follows. I need to use the following command. This works great and I can transfer files fine. sftp -oKexAlgorithms=+diffie-hellman-group1-sha1 paul@nas1:/mnt/array1/backup However, I cannot work out how to specify the the diffle-hellman-group1-sha1 on the rsync command. Can anyone shed some light on this please? So far I have the following: ~$ rsync -va /data paul@nas1:/mnt/array1/backup Unable to negotiate with 192.168.0.9 port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1 rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3] Thanks Paul -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
30.03.2020 20:16, Paul Groves пишет:
Hi all.
I have a question regarding SSH options with Rsync. I have an old NAS which I want to use to rsync some very large files to.
I set up a user and a folder on the NAS. I can connect easily via sftp, although I need to specify an algorithm as follows. I need to use the following command. This works great and I can transfer files fine.
sftp -oKexAlgorithms=+diffie-hellman-group1-sha1 paul@nas1:/mnt/array1/backup
However, I cannot work out how to specify the the diffle-hellman-group1-sha1 on the rsync command. Can anyone shed some light on this please?
rsync -e "ssh -oKexAlgorithms=+diffie-hellman-group1-sha1" ... or export RSYNC_RSH="ssh -oKexAlgorithms=+diffie-hellman-group1-sha1" rsync ...
So far I have the following:
~$ rsync -va /data paul@nas1:/mnt/array1/backup Unable to negotiate with 192.168.0.9 port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1 rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3]
Thanks Paul
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 30/03/2020 18:39, Andrei Borzenkov wrote:
30.03.2020 20:16, Paul Groves пишет:
Hi all.
I have a question regarding SSH options with Rsync. I have an old NAS which I want to use to rsync some very large files to.
I set up a user and a folder on the NAS. I can connect easily via sftp, although I need to specify an algorithm as follows. I need to use the following command. This works great and I can transfer files fine.
sftp -oKexAlgorithms=+diffie-hellman-group1-sha1 paul@nas1:/mnt/array1/backup
However, I cannot work out how to specify the the diffle-hellman-group1-sha1 on the rsync command. Can anyone shed some light on this please?
rsync -e "ssh -oKexAlgorithms=+diffie-hellman-group1-sha1" ...
or
export RSYNC_RSH="ssh -oKexAlgorithms=+diffie-hellman-group1-sha1" rsync ...
So far I have the following:
~$ rsync -va /data paul@nas1:/mnt/array1/backup Unable to negotiate with 192.168.0.9 port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1 rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3]
Thanks Paul
Hi Andrei. I have just tried as you suggested but unfortunately that does not work and I am greeted with the same error for both of those suggestions. See below. Thanks Paul ~$ rsync -e "ssh -oKexAlgorithms=+diffie-hellman-group1-sha1" -va /data paul@nas1:/mnt/array1/backup Password: Operation not permitted rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(235) [sender=3.1.3] ~$ export RSYNC_RSH="ssh -oKexAlgorithms=+diffie-hellman-group1-sha1" ~$ rsync -va /data paul@nas1:/mnt/array1/backup Password: Operation not permitted rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(235) [sender=3.1.3] -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
30.03.2020 20:51, Paul Groves пишет:
On 30/03/2020 18:39, Andrei Borzenkov wrote:
30.03.2020 20:16, Paul Groves пишет:
Hi all.
I have a question regarding SSH options with Rsync. I have an old NAS which I want to use to rsync some very large files to.
I set up a user and a folder on the NAS. I can connect easily via sftp, although I need to specify an algorithm as follows. I need to use the following command. This works great and I can transfer files fine.
sftp -oKexAlgorithms=+diffie-hellman-group1-sha1 paul@nas1:/mnt/array1/backup
However, I cannot work out how to specify the the diffle-hellman-group1-sha1 on the rsync command. Can anyone shed some light on this please?
rsync -e "ssh -oKexAlgorithms=+diffie-hellman-group1-sha1" ...
or
export RSYNC_RSH="ssh -oKexAlgorithms=+diffie-hellman-group1-sha1" rsync ...
So far I have the following:
~$ rsync -va /data paul@nas1:/mnt/array1/backup Unable to negotiate with 192.168.0.9 port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1 rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.3]
Thanks Paul
Hi Andrei. I have just tried as you suggested but unfortunately that does not work and I am greeted with the same error for both of those suggestions. See below.
Well, this is different error than you had before. Try adding "-vvv" to ssh options to see where it fails.
Thanks Paul
~$ rsync -e "ssh -oKexAlgorithms=+diffie-hellman-group1-sha1" -va /data paul@nas1:/mnt/array1/backup Password: Operation not permitted rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(235) [sender=3.1.3]
~$ export RSYNC_RSH="ssh -oKexAlgorithms=+diffie-hellman-group1-sha1" ~$ rsync -va /data paul@nas1:/mnt/array1/backup Password: Operation not permitted
It certainly sounds like it is past failed key exchange.
rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(235) [sender=3.1.3]
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 30/03/2020 18:58, Andrei Borzenkov wrote:
Well, this is different error than you had before. Try adding "-vvv" to ssh options to see where it fails.
This file is very very long, so i have just included the part after authentication as there are no errors before this. Please see output below. I have had a long read of it and I do not understand why it is failing.
It certainly sounds like it is past failed key exchange.
To rule it out, I deleted my /home/paul/.ssh/known_hosts file and tried again. I said yes to continue connecting when it couldn't find this file.I got the same error. Debug Output: Authenticated to nas1 ([192.168.1.5]:22). debug2: fd 4 setting O_NONBLOCK debug3: fd 5 is O_NONBLOCK debug1: channel 0: new [client-session] debug3: ssh_session2_open: channel_new: 0 debug2: channel 0: send open debug3: send packet: type 90 debug1: Entering interactive session. debug1: pledge: network debug3: receive packet: type 91 debug2: channel_input_open_confirmation: channel 0: callback start debug2: fd 3 setting TCP_NODELAY debug3: ssh_packet_set_tos: set IP_TOS 0x08 debug2: client_session2_setup: id 0 debug1: Sending environment. debug3: Ignored env SHELL debug3: Ignored env SESSION_MANAGER debug3: Ignored env COLORTERM debug3: Ignored env XDG_CONFIG_DIRS debug3: Ignored env XDG_MENU_PREFIX debug3: Ignored env GNOME_DESKTOP_SESSION_ID debug3: Ignored env GTK_IM_MODULE debug3: Ignored env LANGUAGE debug3: Ignored env QT4_IM_MODULE debug3: Ignored env GNOME_SHELL_SESSION_MODE debug3: Ignored env SSH_AUTH_SOCK debug3: Ignored env XMODIFIERS debug3: Ignored env DESKTOP_SESSION debug3: Ignored env SSH_AGENT_PID debug3: Ignored env GTK_MODULES debug3: Ignored env PWD debug3: Ignored env LOGNAME debug3: Ignored env XDG_SESSION_DESKTOP debug3: Ignored env XDG_SESSION_TYPE debug3: Ignored env GPG_AGENT_INFO debug3: Ignored env XAUTHORITY debug3: Ignored env WINDOWPATH debug3: Ignored env HOME debug3: Ignored env USERNAME debug3: Ignored env IM_CONFIG_PHASE debug1: Sending env LANG = en_GB.UTF-8 debug2: channel 0: request env confirm 0 debug3: send packet: type 98 debug3: Ignored env LS_COLORS debug3: Ignored env XDG_CURRENT_DESKTOP debug3: Ignored env VTE_VERSION debug3: Ignored env GNOME_TERMINAL_SCREEN debug3: Ignored env INVOCATION_ID debug3: Ignored env MANAGERPID debug3: Ignored env CLUTTER_IM_MODULE debug3: Ignored env LESSCLOSE debug3: Ignored env XDG_SESSION_CLASS debug3: Ignored env TERM debug3: Ignored env LESSOPEN debug3: Ignored env USER debug3: Ignored env GNOME_TERMINAL_SERVICE debug3: Ignored env DISPLAY debug3: Ignored env SHLVL debug3: Ignored env QT_IM_MODULE debug3: Ignored env XDG_RUNTIME_DIR debug3: Ignored env JOURNAL_STREAM debug3: Ignored env XDG_DATA_DIRS debug3: Ignored env PATH debug3: Ignored env GDMSESSION debug3: Ignored env DBUS_SESSION_BUS_ADDRESS debug3: Ignored env _ debug1: Sending command: rsync --server -vlogDtpre.iLsfxC . /mnt/array1/backup debug2: channel 0: request exec confirm 1 debug3: send packet: type 98 debug2: channel_input_open_confirmation: channel 0: callback done debug2: channel 0: open confirm rwindow 0 rmax 32768 debug2: channel 0: rcvd adjust 131072 debug3: receive packet: type 99 debug2: channel_input_status_confirm: type 99 id 0 debug2: exec request accepted on channel 0 debug3: receive packet: type 98 debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug2: channel 0: rcvd ext data 24 Operation not permitted debug2: channel 0: written 24 to efd 6 debug3: receive packet: type 96 debug2: channel 0: rcvd eof debug2: channel 0: output open -> drain debug2: channel 0: obuf empty debug2: channel 0: chan_shutdown_write (i0 o1 sock -1 wfd 5 efd 6 [write]) debug2: channel 0: output drain -> closed debug3: receive packet: type 97 debug2: channel 0: rcvd close debug2: channel 0: chan_shutdown_read (i0 o3 sock -1 wfd 4 efd 6 [write]) debug2: channel 0: input open -> closed debug3: channel 0: will not send data after close debug2: channel 0: almost dead debug2: channel 0: gc: notify user debug2: channel 0: gc: user detached debug2: channel 0: send close debug3: send packet: type 97 debug2: channel 0: is dead rsync: connection unexpectedly closed (0 bytes received so far) [sender]debug2: channel 0: garbage collecting debug1: channel 0: free: client-session, nchannels 1 debug3: channel 0: status: The following connections are open: #0 client-session (t4 r0 i3/0 o3/0 e[write]/0 fd -1/-1/6 sock -1 cc -1) rsync error: error in rsync protocol data stream (code 12) at io.c(235) [sender=3.1.3] -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 19/04/2020 13:16, Paul Groves wrote:
Please see output below. I have had a long read of it and I do not understand why it is failing.
As far as I can tell it is the rsync command that is failing but I can't tell you why. Why don't you test this over again with a much simpler command that is less likely to fail? Me, I'd start with a parameterless one like "date" then progress to a simple fixed single parameter command like "cat /etc/os-release". That at least will tell you of the problem is with the rsync command or with the way SSH is working. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
19.04.2020 20:16, Paul Groves пишет:
On 30/03/2020 18:58, Andrei Borzenkov wrote:
Well, this is different error than you had before. Try adding "-vvv" to ssh options to see where it fails.
This file is very very long, so i have just included the part after authentication as there are no errors before this.
Please see output below. I have had a long read of it and I do not understand why it is failing.
Authentication was successful and command was (attempted to be) started on server side.
It certainly sounds like it is past failed key exchange.
To rule it out, I deleted my /home/paul/.ssh/known_hosts file and tried again. I said yes to continue connecting when it couldn't find this file.I got the same error.
Debug Output:
debug1: Sending command: rsync --server -vlogDtpre.iLsfxC . /mnt/array1/backup Operation not permitted
Try adding rsync option --protocol=29. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2020/03/30 10:51, Paul Groves wrote:
~$ export RSYNC_RSH="ssh -oKexAlgorithms=+diffie-hellman-group1-sha1" ~$ rsync -va /data paul@nas1:/mnt/array1/backup Password: Operation not permitted rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(235) [sender=3.1.3]
First you wanna verify that you can login from the machine initiating the connection via ssh with no password as the userid you are using. IF that works, the rest is pretty str8 forward. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
Andrei Borzenkov
-
Anton Aylward
-
L A Walsh
-
Paul Groves