A user suggests to use Rsync instead, as Rsync is running through SSH for weewx. see http://www.weewx.com/docs/usersguide.htm#config_RSYNC "*Fast, efficient, and secure, it does an incremental update, that is, it only synchronizes those parts of a file that have changed, saving the outgoing bandwidth of your Internet connection. *
* 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.*" Indeed an option to try. I'll switch to that. On Tuesday, January 10, 2023 at 3:57:09 PM UTC+1 Invisible Man wrote: > Hello, > I have recently enable sftp on Weewx, to upload the weewx web pages to a > remote site. > Before that, I used ftp, and it worked no problem, but I'm have errors > with SFTP. > > - I'm using Weewx 4.9.1 > - Python 3.7.3 > - I can connect by hand to the remote sftp no problem > - Not sure if I should be using passive or non passive for SFTP. > > ``` > Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR weewx.reportengine: > ftpgenerator: (2): caught exception '<class 'socket.timeout'>': timed out > Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR weewx.reportengine: > **** Traceback (most recent call last): > Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR weewx.reportengine: > **** File "/usr/share/weewx/weewx/reportengine.py", line 437, in > run > Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR weewx.reportengine: > **** n = ftp_data.run() > Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR weewx.reportengine: > **** File "/usr/share/weewx/weeutil/ftpupload.py", line 175, in > run > Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR weewx.reportengine: > **** ftp_server.connect(self.server, self.port) > Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR weewx.reportengine: > **** File "/usr/lib/python3.7/ftplib.py", line 155, in connect > Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR weewx.reportengine: > **** self.welcome = self.getresp() > Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR weewx.reportengine: > **** File "/usr/lib/python3.7/ftplib.py", line 236, in getresp > Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR weewx.reportengine: > **** resp = self.getmultiline() > Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR weewx.reportengine: > **** File "/usr/lib/python3.7/ftplib.py", line 226, in > getmultiline > Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR weewx.reportengine: > **** nextline = self.getline() > Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR weewx.reportengine: > **** File "/usr/lib/python3.7/ftplib.py", line 204, in getline > Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR weewx.reportengine: > **** line = self.file.readline(self.maxline + 1) > Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR weewx.reportengine: > **** File "/usr/lib/python3.7/socket.py", line 589, in readinto > Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR weewx.reportengine: > **** return self._sock.recv_into(b) > Jan 10 15:52:16 vegan python3[7637]: weewx[7637] ERROR weewx.reportengine: > **** socket.timeout: timed out > ``` > > this is my weewx.conf file: > > ``` > [[FTP]] > skin = Ftp > enable = True > > # FTP'ing the results to a webserver is treated as just another > report, > # albeit one with an unusual report generator! > # > # If you wish to use FTP, uncomment and fill out the next four > lines: > user = CENSORED > password = CENSORED > server = CENSORED > path = / > > # If you wish to upload files from something other than what > HTML_ROOT > # is set to above, then reset it here: > HTML_ROOT = external_html > > # Most FTP servers use port 21, but if yours is different, you can > # change it here > port = 22 > > # Set to 1 to use passive mode, zero for active mode: > passive = 1 > > # How many times to try to transfer a file before giving up: > max_tries = 5 > > # Set to True for a secure FTP (SFTP) connection. Not all servers > # support this. > secure_ftp = True > ``` > -- 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/5ef81cbd-b196-4b6d-a9c0-b75040e804c2n%40googlegroups.com.