I'm copying images from another PC every 3 hours. But recently I encountered an error.
When I try to ssh to that PC I get this:
Unable to negotiate with 192.xxx.xx.xx port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
I searched for a solution for this error and I found this:
-oKexAlgorithms=+diffie-hellman-group1-sha1
If I try to run that in the terminal with ssh, the error disappears, but I'm looking to have this work in a script.
This is what I came up with:
sshpass -p ${pass} rsync -v --include="*/" --include="*.png" --exclude="*" --no-o --no-g --no-perms --omit-dir-times ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 ${usr}@${servip}:
But I got this errorP:
Unexpected remote arg: user@xxx.xxx.xx.xx:/home/nwpops/wrfcntl/plots/op01/20220419_0000/d01/f00000/pcpacc1h_mm.png
rsync error: syntax or usage error (code 1) at main.c(1372) [sender=3.1.3]
Any suggestion is appreciated.