Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit d94d8c0

Browse files
committed
Add warning about kssh using the -F argument
1 parent 78171b8 commit d94d8c0

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/cmd/kssh/kssh.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ func runSSHWithKey(keyPath string, remainingArgs []string) {
301301

302302
argumentList := []string{"-i", keyPath, "-o", "IdentitiesOnly=yes"}
303303
if useConfig {
304+
warnAboutAlternateConfig(remainingArgs)
304305
argumentList = append(argumentList, "-F", kssh.AlternateSSHConfigFile)
305306
}
306307

@@ -318,3 +319,13 @@ func runSSHWithKey(keyPath string, remainingArgs []string) {
318319
}
319320
os.Exit(0)
320321
}
322+
323+
func warnAboutAlternateConfig(arguments []string) {
324+
for _, arg := range arguments {
325+
if arg == "-F" {
326+
fmt.Println("Warning: kssh uses the -F argument in order to implement support for default SSH users. It " +
327+
"is not supported to run kssh with a default user and the -F flag. Either do not use the -F flag or run" +
328+
"`kssh --clear-default-user` to reset the default SSH user. ")
329+
}
330+
}
331+
}

0 commit comments

Comments
 (0)