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

Stuck on "SSH password" prompt #1398

Open
ansibleguy opened this issue Oct 5, 2024 · 2 comments
Open

Stuck on "SSH password" prompt #1398

ansibleguy opened this issue Oct 5, 2024 · 2 comments
Labels
needs_triage New item that needs to be triaged

Comments

@ansibleguy
Copy link

ansibleguy commented Oct 5, 2024

Greetings.

Version: 2.4.0 and 2.3.6 (at least)

If we supply passwords (ssh, become and vault) it gets stuck at the SSH prompt.

We bascially supply the secrets like this:

args['ssh_key'] = creds.ssh_key
args['passwords'] = {}
args['passwords'][r'^SSH\s[pP]assword:\s*$'] = creds.connect_pass
args['passwords'][r'^BECOME\s[pP]assword:\s*$'] = creds.become_pass
args['passwords'][r'^Vault\s[pP]assword:\s*$'] = creds.vault_pass
RunnerConfig(**args)

I've debugged it and the password is actually sent here: https://github.com/ansible/ansible-runner/blob/2.4.0/src/ansible_runner/runner.py#L321

But the execution is stuck forever (not even a timeout?) at this point.

I've tried adding \r\n to the password and even using pexpect's sendcontrol - but without any change.
If another sendline is performed directly after the SSH prompt - it is unstuck. But the next prompt fails as it seems this empty-input is used for that one..

I've got it working for now as seen in this fork: https://github.com/ansibleguy/ansible-runner/blob/release_2.4/src/ansibleguy_runner/runner.py#L323
But that solution is not really clean.

@github-actions github-actions bot added the needs_triage New item that needs to be triaged label Oct 5, 2024
@ansibleguy
Copy link
Author

Related: #534, ansibleguy/webui#70

@ansibleguy
Copy link
Author

Has occurred on multiple systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_triage New item that needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant