Awesome, thanks so much for being so patient and providing crystal clear instrustions. I believe I was 99% there, but had not reset the permissions on roots ssh folder. In the meantime I have found that following the instructions for systemd to https://github.com/weewx/weewx/wiki/systemd with a bit of additional permsission changing got me running weewx as a non root user, then the next part of creating the ssh keys and ssh-copy-id etc was very easy and it just worked. I have been doing this on a test virtual machine to make sure all is good before I touch the live system. Thanks again! Oz
On Sunday, 14 June 2020 19:59:37 UTC+2, mwall wrote: > > On Sunday, June 14, 2020 at 12:18:28 PM UTC-4, Ossian wrote: >> >> I am having a similar issue. I keep seeing mention of the need or >> possibility to provide correct keys etc for root to use, but have not found >> anything concrete to go on. >> > > there are many ways to do this, for example, one approach is with > command-line arguments, while another approach is to use the ssh config > file. > > lets say that you connect to the server 'server.example.com' via rsync as > the user 'weewx' using the credentials in these files: > > /home/pi/.ssh/id_rsa_weewx > /home/pi/.ssh/id_rsa_weewx.pub > > lets say that you are running weewx as the the user 'root', whose home > directory is /root > > 1) ensure that root has an ssh directory > > sudo mkdir -p /root/.ssh > > 2) copy the credential files into root's ssh space > > sudo cp /home/pi/.ssh/id_rsa_weewx /root/.ssh > sudo cp /home/pi/.ssh/id_rsa_weewx.pub /root/.ssh > > 3) create the ssh configuration file /home/root/.ssh/config with these > contents: > > Host server.example.com > User weewx # this is the username used to connect to the server > IdentityFile /home/root/.ssh/id_rsa_weewx # credentials used to > connect to the server > > 4) finally, ensure that permissions are correct: > > sudo chown root.root /home/root/.ssh > sudo chmod 700 /home/root/.ssh > sudo chmod 600 /home/root/.ssh/config > sudo chmod 600 /home/root/.ssh/id_rsa* > > now when the user 'root' attempts a connection to server.example.com, it > will use the correct credentials, no matter how ssh, scp, or rsync is > invoked > > if you run weewx as some other, user say 'pi' or 'weewx', then put the > files into that user's .ssh directory instead of root's .ssh directory. > > m > -- 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 on the web visit https://groups.google.com/d/msgid/weewx-user/b9596ca1-8b6c-4c1c-84f8-3284993b6974o%40googlegroups.com.