Skip to content

Commit 9537383

Browse files
feat!: add User SSH config directive when creating config entry
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]>
1 parent 4aab6f5 commit 9537383

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmd/topo/setup_keys.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ var setupKeysCmd = &cobra.Command{
6565
modifiers := []ssh.ConfigDirectiveModifier{
6666
ssh.NewEnsureConfigDirectivePath("IdentityFile", privateKeyPath),
6767
ssh.NewEnsureConfigDirective("IdentitiesOnly", "yes"),
68+
ssh.NewEnsureConfigDirective("User", dest.User),
6869
}
6970

7071
return ssh.CreateOrModifyConfigFile(dest, modifiers)

0 commit comments

Comments
 (0)