fix(migrate): copy pub key

Ayman Bagabas created

Change summary

cmd/soft/migrate_config.go | 4 ++++
1 file changed, 4 insertions(+)

Detailed changes

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))
 			}