Skip to content

Conversation

@chickahoona
Copy link

No description provided.

@matteoopenf
Copy link
Contributor

matteoopenf commented Feb 27, 2024

is correllated with this problem :
leHostKey checking (cnopts.hostkeys = None).
ampersand_odoo | warnings.warn(wmsg, UserWarning)
ampersand_odoo |
ampersand_odoo | 2024-02-27 12:20:22,808 13 ERROR ampersand odoo.addons.auto_backup.models.db_backup: Database backup failed: sftp://odbackup@80.86.51.249:22/home/odbackup
ampersand_odoo | Traceback (most recent call last):
ampersand_odoo | File "/opt/odoo/parts/OCA/server-tools/auto_backup/models/db_backup.py", line 213, in backup_log
ampersand_odoo | yield
ampersand_odoo | File "/opt/odoo/parts/OCA/server-tools/auto_backup/models/db_backup.py", line 186, in action_backup
ampersand_odoo | with rec.sftp_connection() as remote:
ampersand_odoo | File "/opt/odoo/parts/OCA/server-tools/auto_backup/models/db_backup.py", line 303, in sftp_connection
ampersand_odoo | return pysftp.Connection(**params)
ampersand_odoo | File "/usr/local/lib/python3.9/dist-packages/pysftp/init.py", line 132, in init
ampersand_odoo | self._tconnect['hostkey'] = self._cnopts.get_hostkey(host)
ampersand_odoo | File "/usr/local/lib/python3.9/dist-packages/pysftp/init.py", line 71, in get_hostkey
ampersand_odoo | raise SSHException("No hostkey for host %s found." % host)
ampersand_odoo | paramiko.ssh_exception.SSHException: No hostkey for host 80.86.51.249 found.
ampersand_odoo | Exception ignored in: <function Connection.del at 0x7f15ad9e1670>
ampersand_odoo | Traceback (most recent call last):
ampersand_odoo | File "/usr/local/lib/python3.9/dist-packages/pysftp/init.py", line 1013, in del
ampersand_odoo | self.close()
ampersand_odoo | File "/usr/local/lib/python3.9/dist-packages/pysftp/init.py", line 784, in close
ampersand_odoo | if self._sftp_live:
ampersand_odoo | AttributeError: 'Connection' object has no attribute '_sftp_live'

@github-actions
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Feb 23, 2025
@github-actions github-actions bot closed this Mar 30, 2025
rrebollo added a commit to BinhexTeam/server-tools that referenced this pull request Dec 10, 2025
Add a new "Host Public Key" field to verify the identity of the remote SFTP server.

- When filled: strict host key verification (protects against man-in-the-middle attacks)
- When empty: host key checking disabled (old behavior preserved, no known_hosts warnings)
- "Test SFTP Connection" button now also validates the provided key
- Eliminates the UserWarning about missing ~/.ssh/known_hosts
- All existing tests pass
- New comprehensive test added for valid/invalid/empty key cases
- Documentation updated in readme/USAGE.md

Based on the original (never merged) PR OCA#2195 from 14.0, now correctly implemented and fully tested for 17.0.
rrebollo added a commit to BinhexTeam/server-tools that referenced this pull request Dec 11, 2025
Add a new "Host Public Key" field to verify the identity of the remote SFTP server.

- When filled: strict host key verification (protects against man-in-the-middle attacks)
- When empty: host key checking disabled (old behavior preserved, no known_hosts warnings)
- "Test SFTP Connection" button now also validates the provided key
- Eliminates the UserWarning about missing ~/.ssh/known_hosts
- All existing tests pass
- New comprehensive test added for valid/invalid/empty key cases
- Documentation updated in readme/USAGE.rst

Based on the original (never merged) PR OCA#2195 from 14.0, now correctly implemented and fully tested for 16.0.
rrebollo added a commit to BinhexTeam/server-tools that referenced this pull request Dec 11, 2025
Add a new "Host Public Key" field to verify the identity of the remote SFTP server.

- When filled: strict host key verification (protects against man-in-the-middle attacks)
- When empty: host key checking disabled (old behavior preserved, no known_hosts warnings)
- "Test SFTP Connection" button now also validates the provided key
- Eliminates the UserWarning about missing ~/.ssh/known_hosts
- All existing tests pass
- New comprehensive test added for valid/invalid/empty key cases
- Documentation updated in readme/USAGE.md

Based on the original (never merged) PR OCA#2195 from 14.0, now correctly implemented and fully tested for 17.0.
rrebollo added a commit to BinhexTeam/server-tools that referenced this pull request Dec 11, 2025
Add a new "Host Public Key" field to verify the identity of the remote SFTP server.

- When filled: strict host key verification (protects against man-in-the-middle attacks)
- When empty: host key checking disabled (old behavior preserved, no known_hosts warnings)
- "Test SFTP Connection" button now also validates the provided key
- Eliminates the UserWarning about missing ~/.ssh/known_hosts
- All existing tests pass
- New comprehensive test added for valid/invalid/empty key cases
- Documentation updated in readme/USAGE.rst

Based on the original (never merged) PR OCA#2195 from 14.0, now correctly implemented and fully tested for 16.0.
rrebollo added a commit to BinhexTeam/server-tools that referenced this pull request Dec 15, 2025
Add a new "Host Public Key" field to verify the identity of the remote SFTP server.

- When filled: strict host key verification (protects against man-in-the-middle attacks)
- When empty: host key checking disabled (old behavior preserved, no known_hosts warnings)
- "Test SFTP Connection" button now also validates the provided key
- Eliminates the UserWarning about missing ~/.ssh/known_hosts
- All existing tests pass
- New comprehensive test added for valid/invalid/empty key cases
- Documentation updated in readme/USAGE.md

Based on the original (never merged) PR OCA#2195 from 14.0, now correctly implemented and fully tested for 17.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale PR/Issue without recent activity, it'll be soon closed automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants