SSH: paramiko also tries the worker's own keys and agent (look_for_keys/allow_agent not disabled) #48

Closed
opened 2026-11-02 08:24:11 +00:00 by christianmanivong · 0 comments
Owner

What happens

The node SSH connection (napalm_proxmox/driver.py ~350-366) calls client.connect() with username, timeout, password and/or pkey only. paramiko's defaults look_for_keys=True and allow_agent=True stay on, so paramiko also tries every key in the worker's own ~/.ssh and any SSH agent it can reach. The driver standard (§5, "Secrets") requires a driver to authenticate only with the credentials it was given.

Expected

look_for_keys=False and allow_agent=False are passed on every connect. Test-first: the connect kwargs carry both as False.

Priority: P3 — a driver authenticating with keys of the host it runs on, against the standard.

Found during the bug sweep of 2026-11-02 (#17).

## What happens The node SSH connection (`napalm_proxmox/driver.py` ~350-366) calls `client.connect()` with `username`, `timeout`, `password` and/or `pkey` only. paramiko's defaults `look_for_keys=True` and `allow_agent=True` stay on, so paramiko also tries every key in the worker's own `~/.ssh` and any SSH agent it can reach. The driver standard (§5, "Secrets") requires a driver to authenticate only with the credentials it was given. ## Expected `look_for_keys=False` and `allow_agent=False` are passed on every connect. Test-first: the connect kwargs carry both as `False`. Priority: P3 — a driver authenticating with keys of the host it runs on, against the standard. Found during the bug sweep of 2026-11-02 (#17).
christianmanivong added the
prio
P3
bug
labels 2026-11-02 08:24:11 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-proxmox#48