From 0bf759333a3ef051979224925b5821c2bf5ab98e Mon Sep 17 00:00:00 2001 From: Pavel Sviderski Date: Mon, 10 Feb 2025 09:14:54 +1000 Subject: [PATCH] fix: populate ssh_key_file in the config when adding machine to cluster --- internal/cli/cli.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/cli/cli.go b/internal/cli/cli.go index 7accb247..2b535271 100644 --- a/internal/cli/cli.go +++ b/internal/cli/cli.go @@ -253,7 +253,8 @@ func (cli *CLI) AddMachine(ctx context.Context, remoteMachine RemoteMachine, clu // Save the machine's SSH connection details in the cluster config. connCfg := config.MachineConnection{ - SSH: config.NewSSHDestination(remoteMachine.User, remoteMachine.Host, remoteMachine.Port), + SSH: config.NewSSHDestination(remoteMachine.User, remoteMachine.Host, remoteMachine.Port), + SSHKeyFile: remoteMachine.KeyPath, } if clusterName == "" { clusterName = cli.config.CurrentCluster