From 91e9f37cc8afc64bde7a8439af1b90dc65e6f52d Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Tue, 4 Apr 2023 12:53:46 -0400 Subject: [PATCH] fix(migrate): copy pub key --- cmd/soft/migrate_config.go | 4 ++++ 1 file changed, 4 insertions(+) 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)) }