rsync fails with host key error in weewx, not from command line

106 views
Skip to first unread message

Chris Richmond

unread,
Aug 21, 2019, 9:29:52 AM8/21/19
to weewx-user
Hi,
   I'm not new to ssh and all, but this one doesn't make sense. I'm messing around with
getting a set of hardware together for a move, and in the process ended up with rsync
errors because of host keys.  So... I removed the hostkey on the weewx end and was
able to ssh without a password to the NAS.  Still got the error, so checked the reverse
direction, which also had a problem, so corrected that.  Rechecked both directions this
morning (by hand) and no problems. *Still* weewx is failing rsync because of host key
errors.  Any more ideas.

pivue:~> sudo grep rsync /var/log/syslog | tail
Aug 21 06:25:16 pivue weewx[9927]: rsyncupload: [['rsync', '--archive', '--stats', '-e ssh', '/home/weewx/public_html/', 'weewx<at>filer2.csrhome.home:/volume1/web/vueweather']] reported errors: Host key verification failed.. 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.2]
Aug 21 06:25:16 pivue weewx[9927]: rsyncupload: rsync executed in 0.30 seconds
pivue:~> ssh filer2

weewx@filer2:~$ ssh pivue.csrhome.home
Linux pivue 4.19.42+ #1219 Tue May 14 21:16:38 BST 2019 armv6l

Last login: Wed Aug 21 06:25:40 2019 from 192.168.2.250
pivue:~> 

Thx, Chris

Graham Eddy

unread,
Aug 21, 2019, 9:50:21 AM8/21/19
to weewx...@googlegroups.com
is it same user running ssh manually as weewx runs as?
____________
Graham Eddy

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/069127e6-f46b-4a3f-9a38-1d8c38439594%40googlegroups.com.

Chris Richmond

unread,
Aug 21, 2019, 9:59:56 AM8/21/19
to weewx-user
Yes.  weewx in this case.  Apparently, filer2 and filer2.csrhome.home end up with separate hostkeys
in known_hosts.  copy/paste of the exact rsync command also prompted to accept the hostkey for
filer2.csrhome.home.  Learn something new everyday.

I'll have to wait until later to see if weewx is successful next time (rsync 3x/day for now).

Chris
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

vince

unread,
Aug 21, 2019, 10:05:55 AM8/21/19
to weewx-user
On Wednesday, August 21, 2019 at 6:59:56 AM UTC-7, Chris Richmond wrote:
copy/paste of the exact rsync command also prompted to accept the hostkey for
filer2.csrhome.home.

That's the issue.  The remote host key changed 'or' you generated a new ~/.ssh/known_hosts file so it's prompting you for whether you trust the remote system is indeed the host it claims to be.

Anthony Fandino

unread,
Aug 21, 2019, 11:09:53 AM8/21/19
to weewx-user
Chris,

    Understand that weewx runs as root. host key and id must be in the root/.ssh/

hope that helps

Tony

Chris Richmond

unread,
Aug 21, 2019, 6:04:00 PM8/21/19
to weewx-user
Hi Tony,

  I've set things up (udev, specify pid file path) so I don't have to run as root.  Vince, what changed was the FQDN of the filer (changed domain names),
so that was the issue.  It's a bit of a learning experience to have two local domains.  As an aside, I've got <2 weeks to figure out how
to VPN between them so I can see either end once they aren't literally within 3ft of my chair and don't share the same ISP connection.
The wan ports are on the same domain (ISP's router ports), and each router (yet more linux boxes) has it's own local domain.
In the meantime, I'm pushing stuff from both sides to an external web service, which is what this is related to.

Thx, Chris

Reply all
Reply to author
Forward
0 new messages