Monday, December 23, 2024

Weird Ansible (and SSH) habits

I am experiencing two bizarre behaviours, out of nowhere, with none intentional change on my half:

  1. Ansible (ansible all -i foo, -m ping) not solely began to ask for the SSH key’s password, but additionally the important thing’s password is now (seemingly) incorrect. ❌

  2. the exact same key password is deemed appropriate by SSH (ssh -F /path/to/my_ssh_config foo) however the password solely works in case 1.:

    1. [✅ works] if typed comparatively shortly;
    2. [❌ doesn’t work] if typed slowly, taking say a second between every key press;
    3. [❌ doesn’t work] if pasted.

Each Ansible and SSH immediate for the password with

Enter passphrase for key '/Customers/foo/.ssh/bar':

(Ansible additionally provides ‘a white key’ Unicode grapheme after the :.)


  • ansible [core 2.17.1]
  • Python 3.11.5
  • OpenSSH_9.4p1, LibreSSL 3.3.6
  • macOS 14.3 (23D56)

Related information:

  • /path/to/my_ssh_config, for each 1. (Ansible) and a couple of. (SSH) above:
Host *
  StrictHostKeyChecking no
  Person ec2-user
  IdentityFile /Customers/foo/.ssh/bar
Host leap
  Hostname 34.1.1.1
Host foo
  ProxyJump leap
  Hostname 10.1.1.1
  • for 1. (Ansible) is beneath ansible.cfg, which is in the identical listing from the place the above Ansible command is run (ansible all):
[defaults]
host_key_checking = False
interpreter_python = auto
stdout_callback=group.common.yaml

[ssh_connection]
ssh_args = -F /path/to/my_ssh_config

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles