-
Notifications
You must be signed in to change notification settings - Fork 21
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
Use the officially supported apache mina sshd in m2k-func #254
Conversation
47b6642
to
279096d
Compare
@rgolangh Please also update the manifest related to m2k-kfunc and make sure the newly needed file is also added in the initContainer and update the install readme accordingly |
ack , I'll also update the e2e resource in this repo |
69608c3
to
a3a4429
Compare
session.setConfig("StrictHostKeyChecking", "no"); | ||
session.setConfig("PreferredAuthentications", "publickey"); | ||
} | ||
var sshSessionFactory = new SshdSessionFactoryBuilder() |
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.
I think that there's a good chance we don't need a custom session factory now that we can you proper .ssh config folder. If we mount the key in the supported defalt name , say id_rsa or id_ed25519 it should work out of the box. Alternatively we could say in the ssh config IdentityFile /path/to/key
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.
and of course make publickey the preferred auth
Host *
PreferredAuthentications publickey
e2e/resources/knative-service.yaml
Outdated
kind: ConfigMap | ||
metadata: | ||
name: m2k-ssh-config | ||
data: |
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.
The ci complains for this:
Error from server (BadRequest): error when creating "e2e/resources/knative-service.yaml": ConfigMap in version "v1" cannot be handled as a ConfigMap: strict decoding error: unknown field "spec"
service.serving.knative.dev/m2k-save-transformation-func created
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.
which is pretty funny since there isn't a real change from the previous version (only location of data
was changed)
52e64d4
to
4b1aac7
Compare
The various git command we use in m2k func now uses the officially supported ssh implementation for the transport. Added tests to see the transport is working well with ed25519 keys Notice - the StrictHost option is now set using a standard ssh_config (see man ssh_config) file which is assumed to be where the key is located - so now we can just drop the id_rsa file in a well known location along with the rest of the .ssh files: /etc/.ssh/config /etc/.ssh/known_hosts /etc/.ssh/id_rsa Signed-off-by: Roy Golan <[email protected]>
@gabriel-farache Fixed the e2e and now they run on the tip of of the PR |
The various git command we use in m2k func now uses the officially
supported ssh implementation for the transport.
Added tests to see the transport is working well with ed25519 keys
Notice - the StrictHost option is now set using a standard ssh_config
(see man ssh_config) file which is assumed to be where the key is located -
so now we can just drop the id_rsa file in a well known location along
with the rest of the .ssh files:
/etc/.ssh/config
/etc/.ssh/known_hosts
/etc/.ssh/id_rsa
Signed-off-by: Roy Golan [email protected]