diff --git a/cmd/soft/migrate_config.go b/cmd/soft/migrate_config.go index 200d46547..e4731ab60 100644 --- a/cmd/soft/migrate_config.go +++ b/cmd/soft/migrate_config.go @@ -52,6 +52,10 @@ var ( return fmt.Errorf("failed to copy ssh key: %w", err) } + if err := copyFile(keyPath+".pub", filepath.Join(cfg.DataPath, "ssh", filepath.Base(keyPath))+".pub"); err != nil { + log.Errorf("failed to copy ssh key: %s", err) + } + cfg.SSH.KeyPath = filepath.Join("ssh", filepath.Base(keyPath)) }