Skip to content

Commit d0258f3

Browse files
author
Quentin Perez
committed
Add a warn message when using ssh exec on host without public ip nor gateway
1 parent 42dbc1a commit d0258f3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/commands/exec.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ func RunExec(ctx CommandContext, args ExecArgs) error {
6666
}
6767
}
6868

69+
if server.PublicAddress.IP == "" && gateway == "" {
70+
log.Warn(`Your host has no public IP address, you should use '--gateway', see 'scw help exec'`)
71+
}
72+
6973
// --timeout
7074
if args.Timeout > 0 {
7175
log.Debugf("Setting up a global timeout of %d seconds", args.Timeout)

0 commit comments

Comments
 (0)