Skip to content

Commit ea5255d

Browse files
committed
Use SSH address also for copy command
Signed-off-by: Anders F Björklund <[email protected]>
1 parent d52b0a2 commit ea5255d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/limactl/copy.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ func copyAction(cmd *cobra.Command, args []string) error {
8787
}
8888
if legacySSH {
8989
scpFlags = append(scpFlags, "-P", fmt.Sprintf("%d", inst.SSHLocalPort))
90-
scpArgs = append(scpArgs, fmt.Sprintf("%s@127.0.0.1:%s", u.Username, path[1]))
90+
scpArgs = append(scpArgs, fmt.Sprintf("%s@%s:%s", u.Username, inst.SSHAddress, path[1]))
9191
} else {
92-
scpArgs = append(scpArgs, fmt.Sprintf("scp://%s@127.0.0.1:%d/%s", u.Username, inst.SSHLocalPort, path[1]))
92+
scpArgs = append(scpArgs, fmt.Sprintf("scp://%s@%s:%d/%s", u.Username, inst.SSHAddress, inst.SSHLocalPort, path[1]))
9393
}
9494
instDirs[instName] = inst.Dir
9595
default:

0 commit comments

Comments
 (0)