You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to weewx-user
The new service I've written uses pysftp which in turn uses SSH. when I run a test script it works. When the service runs I'm getting an SSH exception: SSHException: No hostkey for host 192.168.1.175 found
I thought that the problem might be that there was no .ssh/known_hosts file under /home/weewx so I copied the the file from my ~/.ssh directory into /home/weewx/.ssh/. I got the same error.
Any ideas as to how to get SSH to recognize the known hosts key when running as weewx?
Thanks!
gjr80
unread,
Jan 14, 2018, 4:06:53 PM1/14/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to weewx-user
The issue is most likely related to which user account is running your code. When you run your code outside of weeWX what account is being used? Is that the same account as that which runs weeWX (commonly root)? If they are different you will need to make sure you known hosts file is in ~/.ssh for root. No need for anything in the weeWX tree. Or to take a different approach, try and get your code running outside weeWX when logged in as the account that runs weeWX, once it works it should work under weeWX (well at least the ssh part should work).
You run into similar issues getting rsync to work under weeWX, it's all about the account that runs weeWX not the account you normally login with.
Gary
Joe Percival
unread,
Jan 14, 2018, 4:12:24 PM1/14/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to weewx...@googlegroups.com
Thanks!
I ended up solving the problem by specifying the path to the file using pysftp.CnOpts. The service seems to be working now but we won’t know for sure until we get some snow here in the DRY Sierra Nevada mountains.