Tom - I'm at a loss at this point as to why you're not working (or failing) 
consistently.

I did a setup of rsync over ssh on a clean pi and here are the steps.
Worked first time for me :-)

(this example uses weewx v5.0b15 as user 'pi')

# reimaged a raspberry pi
# installed rsyslog to get traditional syslogging rather than systemd
    sudo apt-get install -y rsyslog

# logged into the pi as unprivileged user pi (for this example)

# installed weewx with the simulator driver

# created a new ssh keypair for the user pi
# taking the defaults to make a passwordless keypair
# which will be ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub
    ssh-keygen

# added this key to the appropriate user@host for my server host
    ssh-copy-id vince@nuc2

# verified I could log into the remote server
    ssh vince@nuc2
# at this point ssh is known to work using the new ssh key....

# edited weewx.conf to set debug=1 for more verbose logging

# edited weewx.conf to configure the RSYNC uploader
# so this will upload the default public_html to the specified path

   [[RSYNC]]
        skin = Rsync
        enable = true
        server = nuc2
        user = vince
        path = /home/vince/weehtml
        log_success = true
        log_failure = true
        delete = 0

# restarted weewx, waited 5 minutes, I see the successful rsync of the 
Seasons skin in syslog

    2023-10-29T19:00:20.236994-07:00 raspberrypi weewx[2416] DEBUG 
weeutil.rsyncupload: rsyncupload: cmd: [['rsync', '--archive', '--stats', 
'-e', 'ssh', '/home/pi/weewx-data/public_html/', 
'vince@nuc2:/home/vince/weehtml']]

    2023-10-29T19:00:20.680310-07:00 raspberrypi weewx[2416] INFO 
weeutil.rsyncupload: rsync'd 73 files (526,454 bytes) in 0.44 seconds

# Notes:
#  - no /home/pi/.ssh/config file was needed on a pi as long as the 
specified 'server' resolves
#       because ssh on the pi defaults to using ~/.ssh/id_rsa as the 
private key
#  - weewx assumes the local user is the one it is running as
#  - weewx uses the RSYNC 'user' as the remote user it connects to


-- 
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/3ef25380-b380-4479-b1b7-b943906c8c18n%40googlegroups.com.

Reply via email to