Skip to content
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

ssh_key or password? - try both #1936

Open
nadtoka opened this issue Sep 5, 2023 · 0 comments
Open

ssh_key or password? - try both #1936

nadtoka opened this issue Sep 5, 2023 · 0 comments

Comments

@nadtoka
Copy link

nadtoka commented Sep 5, 2023

Hello everyone,

I have a request for fallback transport protocol. The case is that in some cases I need to ssh login using password and in some using ssh_key.

I am using several suites and initial kitchen converge is using password, then it is being changed and key should be used. All is automated. When both (password and ssh_key) set then pass is used by default. But it would be great to switch to key auth then during same pipeline if password returned SSH Failed login error. In different circumstances I have or password allowed or ssh_key only and there is no way to add condition in transport layer.

transport:
name: ssh
username: "<%= ENV['SSH_USER'] %>"
password: "<%= ENV['SSH_PWD'] %>"
ssh_key: "<%= ENV['SSH_KEY_PATH'] %>"
port: "<%= ENV['SSH_PORT'] %>"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant