-
-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[16.0] fs_storage: support SSH private keys authentication #331
base: 16.0
Are you sure you want to change the base?
[16.0] fs_storage: support SSH private keys authentication #331
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG. Could we have some test cov?
c2fe279
to
4b47b01
Compare
@simahawk what's the best approach here to test? Current module doesn't depend on Or should we put tests in a dedicated |
SSH connections can now be done with private keys by setting the `pkey` + `passphrase` options. Coupled with the `eval_options_from_env` this allows to set these ones from the environment, e.g: `{"host": "sftp.example.net", "username": "sftp", "pkey": "$SSH_KEY", "passphrase": "$SSH_PASSPHRASE", "port": 22}`
4b47b01
to
c0b3315
Compare
EDIT: this doesn't work neither. Better to generate the key in a proper manner with |
11f29f1
to
6f33885
Compare
In fact, we are adding too many SFTP related feature to the base module... IMO we need a separated module for sftp: |
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. |
@sebalix Do you plan to continue and create a new module with the feature ? FYI, I did manage a SFTP connection with a private key, using sshfs (https://github.com/fsspec/sshfs). If you install this lib, it will replace sftp default paramiko implementation by another based on asyncssh. IMO, we could drop this and maybe write somewhere to install sshfs if you want to manage keys, or do you see any reason not to use the sshfs implementation ? |
ping @sebalix @simahawk Do you've seen the last comment from @florian-dacosta? Can we close-it? |
SSH connections can now be done with private keys by setting the
pkey
+passphrase
options. Coupled with theeval_options_from_env
this allows to set these ones from the environment, e.g:{"host": "sftp.example.net", "username": "odoo", "pkey": "$SSH_KEY", "passphrase": "$SSH_PASSPHRASE", "port": 22}