fix: rename IdentityFile to SSHKeyFile

This commit is contained in:
Connor Edwards
2025-02-09 18:39:44 +00:00
parent 99219dc376
commit 3d2d9b78e8
2 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -92,7 +92,7 @@ func (cli *CLI) ConnectCluster(ctx context.Context, clusterName string) (*client
return nil, fmt.Errorf("parse SSH connection %q: %w", conn.SSH, err)
}
keyPath := fs.ExpandHomeDir(conn.IdentityFile)
keyPath := fs.ExpandHomeDir(conn.SSHKeyFile)
sshConfig := &connector.SSHConnectorConfig{
User: user,
@@ -167,7 +167,7 @@ func (cli *CLI) initRemoteMachine(
// Save the machine's SSH connection details in the cluster config.
connCfg := config.MachineConnection{
SSH: config.NewSSHDestination(remoteMachine.User, remoteMachine.Host, remoteMachine.Port),
IdentityFile: remoteMachine.KeyPath,
SSHKeyFile: remoteMachine.KeyPath,
}
cli.config.Clusters[clusterName].Connections = append(cli.config.Clusters[clusterName].Connections, connCfg)
if err = cli.config.Save(); err != nil {
+1 -1
View File
@@ -18,7 +18,7 @@ type MachineConnection struct {
TCP netip.AddrPort `toml:"tcp,omitempty"`
Host string `toml:"host,omitempty"`
PublicKey secret.Secret `toml:"public_key,omitempty"`
IdentityFile string `toml:"identity_file,omitempty"`
SSHKeyFile string `toml:"ssh_key_file,omitempty"`
}
// SSHDestination represents an SSH destination string in the canonical form of "user@host:port".