Skip to content

fix!: allow Literal IP addresses in topo setup-keys#189

Open
tgonzalezorlandoarm wants to merge 2 commits intomainfrom
fix-setup-keys-for-unknown-hosts
Open

fix!: allow Literal IP addresses in topo setup-keys#189
tgonzalezorlandoarm wants to merge 2 commits intomainfrom
fix-setup-keys-for-unknown-hosts

Conversation

@tgonzalezorlandoarm
Copy link
Copy Markdown
Contributor

@tgonzalezorlandoarm tgonzalezorlandoarm commented Apr 8, 2026

Commit 7bd3a2b introduced a regression where topo setup-keys --target <ip> is not a valid target anymore:

topo setup-keys --target 10.1.197.67
ERR no explicit host config found for 10.1.197.67; note: a per user SSH config entry should be created when setting up keys

raw IPs should be accepted.

Changes

  • Allow for literal IP addresses to be introduced.
  • Unify the key file naming convention under id_<keytype>_topo_<user>_<alias/ip>.
  • Start specifying the User directive in the config entry now that we are enforcing a per-user alias/config entry.

@tgonzalezorlandoarm tgonzalezorlandoarm requested a review from a team as a code owner April 8, 2026 10:56
@tgonzalezorlandoarm tgonzalezorlandoarm added the bug Something isn't working label Apr 8, 2026
@tgonzalezorlandoarm tgonzalezorlandoarm force-pushed the fix-setup-keys-for-unknown-hosts branch from 37f575c to 017355e Compare April 9, 2026 12:06
@tgonzalezorlandoarm
Copy link
Copy Markdown
Contributor Author

The following comment is for a different PR, but what I'm thinking about now is the edge case in which you have a Host configured in an ssh config but then you reference it with the IP instead of the Host name.

@tgonzalezorlandoarm tgonzalezorlandoarm marked this pull request as draft April 9, 2026 12:51
Commit  introduced a regression where topo setup-keys --target <ip>
is not a valid target anymore.

* Allow for literal IP addresses to be introduced.
* Unify the key file naming convention under
  `id_<keytype>_topo_<user>_<alias/ip>` .

Signed-off-by: Tomás González <[email protected]>
Specifying the User in the topo_config when adding a new config entry
allows for better detection of conflicting users:

`topo setup-keys --target <ip>` will generate SSH key files for the
default user.

We are already demanding a per-user alias. Might as well enforce it.

Signed-off-by: Tomás González <[email protected]>
@tgonzalezorlandoarm tgonzalezorlandoarm force-pushed the fix-setup-keys-for-unknown-hosts branch from 017355e to 9537383 Compare April 10, 2026 13:27
@tgonzalezorlandoarm tgonzalezorlandoarm marked this pull request as ready for review April 10, 2026 13:36
@tgonzalezorlandoarm tgonzalezorlandoarm changed the title fix: allow Literal IP addresses in topo setup-keys fix!: allow Literal IP addresses in topo setup-keys Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants