-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
dockerpy fails with ssh if remote machine was not added to hosts #2398
Comments
Signed-off-by: heavenlwf <heavenlwf@gmail.com>
@ssbarnea and anyone else who, like me finds this issue. example connection function:
|
In docker-py 4.1.0 it was still an exception. |
Still same issue on 6.0.1. |
Yes, the default policy was changed with 6.x for security, see the "Upgrade Notes" in the changelog:
Agreed. I would be happy to accept/review a PR here. For reference, here's the SSH init code: docker-py/docker/transport/sshconn.py Line 175 in 34e6829
It's worth mentioning that there's 2x supported implementations (Python-native via Paramiko, or shelling out to host SSH binary), so we'll need to account for that. Also, the connection gets created by docker-py/docker/api/client.py Line 108 in 34e6829
The design/coupling here means it might be a bit tricky. I think it's reasonable to overload the That would allow consumers to create a |
This could be avoided by doing
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) before
as mentioned on onyxfish/relay#11 (comment)The text was updated successfully, but these errors were encountered: