Quick follow-up. I switched to RSA keys and got the same error so I don't
think it's the type of encryption. Probably I have something amiss in the
config file . . .
On Monday, April 27, 2020 at 1:56:46 PM UTC-3, WindnFog wrote:
>
> I'm trying to get Matthew Wall's sftp extension working with weeex 3.9.2
> on my Raspberry Pi 4.0. It's a patched up to date version of Raspbian, but
> I get the following error on upload to an sftp server:
>
> Apr 27 13:10:19 rhubarb weewx[12591]: imagegenerator: Generated 13 images
> for StandardReport in 0.49 seconds
> Apr 27 13:10:19 rhubarb weewx[12591]: copygenerator: copied 14 files to
> /var/www/html/weewx
> Apr 27 13:10:19 rhubarb weewx[12591]: reportengine: Caught unrecoverable
> exception in generator 'user.sftp.SFTPGenerator'
> Apr 27 13:10:19 rhubarb weewx[12591]: **** not a valid DSA
> private key file
> Apr 27 13:10:19 rhubarb weewx[12591]: **** Traceback (most recent
> call last):
> Apr 27 13:10:19 rhubarb weewx[12591]: **** File
> "/usr/share/weewx/weewx/reportengine.py", line 204, in run
> Apr 27 13:10:19 rhubarb weewx[12591]: **** obj.start()
> Apr 27 13:10:19 rhubarb weewx[12591]: **** File
> "/usr/share/weewx/weewx/reportengine.py", line 300, in start
> Apr 27 13:10:19 rhubarb weewx[12591]: **** self.run()
> Apr 27 13:10:19 rhubarb weewx[12591]: **** File
> "/usr/share/weewx/user/sftp.py", line 259, in run
> Apr 27 13:10:19 rhubarb weewx[12591]: **** n = uploader.run()
> Apr 27 13:10:19 rhubarb weewx[12591]: **** File
> "/usr/share/weewx/user/sftp.py", line 103, in run
> Apr 27 13:10:19 rhubarb weewx[12591]: **** cnopts=cnopts)
> Apr 27 13:10:19 rhubarb weewx[12591]: **** File
> "/usr/local/lib/python2.7/dist-packages/pysftp/__init__.py", line 142, in
> __init__
> Apr 27 13:10:19 rhubarb weewx[12591]: ****
> self._set_authentication(password, private_key, private_key_pass)
> Apr 27 13:10:19 rhubarb weewx[12591]: **** File
> "/usr/local/lib/python2.7/dist-packages/pysftp/__init__.py", line 171, in
> _set_authentication
> Apr 27 13:10:19 rhubarb weewx[12591]: **** private_key_file,
> private_key_pass)
> Apr 27 13:10:19 rhubarb weewx[12591]: **** File
> "/usr/local/lib/python2.7/dist-packages/paramiko/pkey.py", line 206, in
> from_private_key_file
> Apr 27 13:10:19 rhubarb weewx[12591]: **** key =
> cls(filename=filename, password=password)
> Apr 27 13:10:19 rhubarb weewx[12591]: **** File
> "/usr/local/lib/python2.7/dist-packages/paramiko/dsskey.py", line 65, in
> __init__
> Apr 27 13:10:19 rhubarb weewx[12591]: ****
> self._from_private_key_file(filename, password)
> Apr 27 13:10:19 rhubarb weewx[12591]: **** File
> "/usr/local/lib/python2.7/dist-packages/paramiko/dsskey.py", line 224, in
> _from_private_key_file
> Apr 27 13:10:19 rhubarb weewx[12591]: **** data =
> self._read_private_key_file("DSA", filename, password)
> Apr 27 13:10:19 rhubarb weewx[12591]: **** File
> "/usr/local/lib/python2.7/dist-packages/paramiko/pkey.py", line 279, in
> _read_private_key_file
> Apr 27 13:10:19 rhubarb weewx[12591]: **** data =
> self._read_private_key(tag, f, password)
> Apr 27 13:10:19 rhubarb weewx[12591]: **** File
> "/usr/local/lib/python2.7/dist-packages/paramiko/pkey.py", line 289, in
> _read_private_key
> Apr 27 13:10:19 rhubarb weewx[12591]: **** raise
> SSHException("not a valid " + tag + " private key file")
> Apr 27 13:10:19 rhubarb weewx[12591]: **** SSHException: not a
> valid DSA private key file
> Apr 27 13:10:19 rhubarb weewx[12591]: **** Generator terminated
>
> I installed the extension as per Matthew's instructions here:
>
> https://github.com/matthewwall/weewx-sftp
>
> My weewx.conf section is as follows:
>
> [[SFTP]]
> skin = sftp
> user = pdunphy
> private_key = /root/.ssh/id_ed25519
> server = palang.ca
> port = 9999
> path = public_html
>
> The error suggests paramiko might not be handling the key properly. I am
> using Ed25519 elliptic curve cryptography that I thought should work. I'd
> use regular RSA, but the "guy on the other end" wants Ed25519. Should this
> work, or is it limited to RSA/DSA cryptography?
>
> Or . . . am I missing something else?
>
> Paul VE1DX
>
--
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/e9d2d9d1-231b-41be-b8a7-ee7a72362600%40googlegroups.com.