The remote user is my account on the remote server. 

    [[RSYNC]]
        # rsync'ing to a webserver is treated as just another report.
        skin = Rsync

        # If you wish to use rsync, you must configure passwordless ssh 
using
        # public/private key authentication from the user account that weewx
        # runs to the user account on the remote machine where the files
        # will be copied.
        #
        # If you wish to use rsync, set "enable" to "true", then
        # fill out server, user, and path.
        # The server should appear in your .ssh/config file.
        # The user is the username used in the identity file.
        # The path is the destination directory, such as 
/var/www/html/weather.
        # Be sure that the user has write permissions on the destination!
        enable = true
        server = my.host.com
        user = shane
        path = /var/www/weather

        # To upload files from something other than what HTML_ROOT is set
        # to above, specify a different HTML_ROOT here.
        HTML_ROOT = /var/www/weewx

        # Rsync can be configured to remove files from the remote server if
        # they don't exist under HTML_ROOT locally. USE WITH CAUTION: if you
        # make a mistake in the remote path, you could could unintentionally
        # cause unrelated files to be deleted. Set to 1 to enable remote 
file
        # deletion, zero to allow files to accumulate remotely.
        delete = 0

I am sure this is an rsync setup issue as I can "sudo -u shane weectl 
report run RSYNC" and it works likt it is supposed to when it is run under 
my username. But I cannot get passwordless to work for either root or the 
weewx user if I was to run "sudo -u weewx weectl report run RSYNC". I think 
I am at a loss as to whether /var/lib/weewx/.ssh is the correct place that 
the keys should go (this is where keygen put them) and even though I 
installed the public key on my remote server under my user "shane", it does 
not work and still prompts for a password. 

On Tuesday, May 13, 2025 at 4:15:35 PM UTC-7 John Kline wrote:

> I assume weewx is running as the weewx user.  What is the remote user 
> specified in your RSYNC section?  It might be best to post your RSYNC 
> section of weewx.conf.  It is unlikely to contain a password.
>
> On May 13, 2025, at 5:47 PM, Shane Burkhardt <ing...@gmail.com> wrote:
>
> 
>
> I apologize if similar questions have been posted before, but I have not 
> found anything recent and am really banging my head against the wall. I 
> have rsync set-up but it still prompts for passwords for weewx or root 
> users, although the key pair works fine for me as user. I have run keygen 
> as weewx and as root. It looks like it saves root in the /root/.ssh 
> directory but it saves weewx in the /var/lib/weewx/.ssh directory. I have 
> copied the relevant public keys to the authorized keys file for the user on 
> the remote server I am connecting to. Still no luck. I saw very old 
> postings about a config file, but cannot figure out what that is or find 
> recent documentation of what that might be or where that should go. 
>
> Any help would be much appreciated!
>
> I am running weewx on Ubuntu 24.02.02 VM installed via APT. It is using 
> the weewx user to run. My weather station is a WS5000-IP connected through 
> the GX1000 driver. The Weewx version is 5.10. 
>
> Here is a snippet from the log:
> May 13 15:00:23 asok weewxd[81319]: ERROR weeutil.rsyncupload: rsync 
> reported errors. Original command: ['rsync', '--archive', '--stats', '-e', 
> 'ssh', '/var/www/weewx>
> May 13 15:00:23 asok weewxd[81319]: ERROR weeutil.rsyncupload: **** 
> Permission denied, please try again.
> May 13 15:00:23 asok weewxd[81319]: ERROR weeutil.rsyncupload: **** 
> Permission denied, please try again.
> May 13 15:00:23 asok weewxd[81319]: ERROR weeutil.rsyncupload: **** 
> xx...@my.host.com: Permission denied (publickey,password).
> May 13 15:00:23 asok weewxd[81319]: ERROR weeutil.rsyncupload: **** rsync: 
> connection unexpectedly closed (0 bytes received so far) [sender]
> May 13 15:00:23 asok weewxd[81319]: ERROR weeutil.rsyncupload: **** rsync 
> error: unexplained error (code 255) at io.c(232) [sender=3.2.7]
> May 13 15:00:25 asok weewxd[81319]: DEBUG user.gw1000: Next update in 5 
> seconds
>
>
>
> -- 
> 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 visit 
> https://groups.google.com/d/msgid/weewx-user/b17c5f1d-74fd-4890-bb70-76c0023966fdn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/weewx-user/b17c5f1d-74fd-4890-bb70-76c0023966fdn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/weewx-user/e7b499e3-475e-4acf-9ffe-e5540ed42623n%40googlegroups.com.

Reply via email to