This is rsync 101. You need the account you are running weewx under (root) to have a ~/.ssh/config file that tells it which key to use to connect to the remote system, as well as which account to use on the remote side.
Host my.remote.host.com IdentityFile ~/.ssh/my_private_key user my_remote_username If you do that, then as root you should be able to rsync to my.remote.host.com and it will log in there as my_remote_username On Tuesday, April 13, 2021 at 11:15:12 PM UTC-7 Dun Mac wrote: > Hi, > I have established a direct connection to a web server (GreenGeeks) with > the SSH keys added to the remote server. I can log on to the remote server > via > "ssh [email protected]" and it logs on with no passwords. > When I set weewx.conf, Rsync to true I get the following error message in > syslog; > > Apr 14 12:00:36 RPi-weather weewx[29143] DEBUG weewx.reportengine: Running > report 'RSYNC' > Apr 14 12:00:36 RPi-weather weewx[29143] DEBUG weewx.reportengine: Found > configuration file /etc/weewx/skins/Rsync/skin.conf for report 'RSYNC' > Apr 14 12:00:36 RPi-weather weewx[29143] DEBUG weeutil.rsyncupload: > rsyncupload: cmd: [['rsync', '--archive', '--stats', '-e ssh', > '/var/www/html/weewx/', > '[email protected]:/home//weewx/wx_standard_report']] > Apr 14 12:00:39 RPi-weather weewx[29143] ERROR weeutil.rsyncupload: > [['rsync', '--archive', '--stats', '-e ssh', '/var/www/html/weewx/', > '[email protected]:Permission denied > (publickey,gssapi-keyex,gssapi-with-mic,password).. rsync: connection > unexpectedly closexxxd (0 bytes received so far) [sender]. rsync error: > unexplained error (code 255) /home/xxxxxxx/weewx/wx_standard_report']] > reported errors: [email protected]: at io.c(235) [sender=3.1.3] > Apr 14 12:00:39 RPi-weather weewx[29143] INFO weeutil.rsyncupload: rsync > executed in 2.62 seconds > > Would someone be kind enough to post their ~/.ssh/config and their > /etc/ssh/ssh_config and /etc/ssh/sshd_config files so I can see if I have > an error in one of these files with my setup, please. Any other feedback > would also be very welcome. > Duncan > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/f5731a9e-f2e9-46be-9c84-54176bebbbe7n%40googlegroups.com.
