I ran RSYNC with 4.10 with no problems. I've read and re-read the RSYNC
docs for 4.10, 5.0, and 5.1
No success so I really appreciate any help. Ironically it looks like from
the 5.0 documentation, if I had upgraded
from 4.10 rather than a clean 5.1 install, the installer would have kept my
user "pi" and not "weewx", and i think i wouldn't
have these problems. I think my problem is the daemon user is "weewx" and
I can't set up permissions for ssh with "weewx".
What I've done so far:
___________________________________________________
1. made fresh SD card with bookworm
2. logged in as user "pi"
3. fresh weewx install using apt install
4. set up weewx.conf:
[[RSYNC]]
enable = true
server = ZZZ.1and1-data.host
user = XXX
path = YYY/
5. ps aux | grep "weewx" (shows user weewx running weewxd)
weewx 6460 1.9 8.8 364336 81720 ? Ssl 12:46 10:30
python3 /usr/share/weewx/weewxd.py /etc/weewx/weewx.conf
6. ssh-keygen
7. ssh-copy-id [email protected]
8. ssh'd to remote_server (success)
9. rsync'd test files to remote_server (success)
10. cp ~/.ssh/*.* /var/lib/weewx/.ssh
11. sudo chown weewx:weewx /var/lib/weewx/.ssh/*.*
-rwxrwx--- 1 weewx weewx 560 May 20 12:23 id_rsa.pub
-rw------- 1 weewx weewx 364 May 19 22:18 known_hosts
-rwxrwx--- 1 weewx weewx 142 May 20 12:23 known_hosts.old
12. weectl report run RSYNC (WORKS from user pi without error YAY)
13. running weewx via systemd, NO JOY. Here's the error message:
weewxd[6460]: ERROR weeutil.rsyncupload: rsync reported errors. Original
command: ['rsync', '--archive', '--stats', '-e', 'ssh',
'/var/www/html/weewx/', '[email protected]:YYY']
weewxd[6460]: ERROR weeutil.rsyncupload: **** Permission denied, please try
again.
weewxd[6460]: ERROR weeutil.rsyncupload: **** Permission denied, please try
again.
weewxd[6460]: ERROR weeutil.rsyncupload: **** [email protected]:
Permission denied (publickey,password).
weewxd[6460]: ERROR weeutil.rsyncupload: **** rsync: connection
unexpectedly closed (0 bytes received so far) [sender]
weewxd[6460]: ERROR weeutil.rsyncupload: **** rsync error: unexplained
error (code 255) at io.c(232) [sender=3.2.7]
>From reading the above posts, and looking everywhere i can, i am pretty
sure i haven't set up the weewx ssh key properly.
I can't find a config or .config file in my ~/.ssh directory, but rsync
works as user pi, so that doesn't seem to be the problem.
How do I set up ssh for the weewx user? I copied my pi ssh files as
instructed above (and as mentioned by vince) but that didn't work.
Thank you so much for any help.
On Sunday, June 2, 2024 at 11:39:00 AM UTC-4 vince wrote:
> Agree. My error there. I keep forgetting the weewx accounts $HOME for
> packaged installs is in an odd location. Thanks !
>
> On Sunday, June 2, 2024 at 6:07:15 AM UTC-7 PBudmark wrote:
>
>> As correctly stated in
>> https://groups.google.com/g/weewx-user/c/50VCTyL-Tpw/m/DgScCzIDAQAJ, the
>> home directory for weewx is /var/lib/weewx and not /home/weewx, so .ssh
>> need to go into /var/lib/weewx/.ssh
>>
>> On Sunday, June 2, 2024 at 4:32:07 AM UTC+1 Ben W. wrote:
>>
>> Thanks, Vince!
>> I'm pretty sure I saw that link in my results, but the Ubuntu reference
>> resulted in my continue scrolling. I will try your suggestion when I get
>> back home!
>>
>> On Saturday, June 1, 2024 at 7:59:44 PM UTC-5 vince wrote:
>>
>> If you google your exact error "*Host key verification failed."* and it
>> will return what's going on....
>>
>>
>> https://askubuntu.com/questions/45679/ssh-connection-problem-with-host-key-verification-failed-error
>>
>> The weewx-related answer is that you're using old notes that are still
>> expecting the 'root' user on the weewx system to be the local user, which
>> is no longer accurate. In v5 it is the 'weewx' user (upgrade guide link)
>> <https://www.weewx.com/docs/5.0/upgrade/#weewx-runs-as-non-root-user>.
>> So it is very likely the host key of the remote computer is not known in
>> the /home/weewx/.ssh/known_hosts file. Simplest way around this would be
>> do append whatever is in your legacy /root/.ssh/known_hosts file to your
>> /home/weewx/.ssh/known_hosts file.
>>
>> On Saturday, June 1, 2024 at 5:34:36 PM UTC-7 Ben W. wrote:
>>
>> Greetings!
>> ::
>>
>>
>>
--
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 visit
https://groups.google.com/d/msgid/weewx-user/d910463d-ab6a-4158-84fc-5edc1bb6e5e2n%40googlegroups.com.