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

Commit 7455505

Browse files
committed
Use only the listed identity file
1 parent d0dc8ca commit 7455505

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/kssh/ssh.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ func CreateDefaultUserConfigFile(keyPath string) error {
4343
f.Close()
4444
}
4545

46-
// This config file sets a default ssh user and a default ssh key. This ensures that kssh's signed key will be
47-
// attempted before any other keys in the ssh-agent
46+
// This config file sets a default ssh user and a default ssh key. This ensures that kssh's signed key will be used.
4847
config := fmt.Sprintf("# kssh config file to set a default SSH user\n"+
4948
"Include config\n"+
5049
"Host *\n"+
5150
" User %s\n"+
52-
" IdentityFile %s\n", user, keyPath)
51+
" IdentityFile %s\n"+
52+
" IdentitiesOnly yes\n", user, keyPath)
5353

5454
f, err := os.OpenFile(AlternateSSHConfigFile, os.O_CREATE|os.O_WRONLY, 0644)
5555
if err != nil {

0 commit comments

Comments
 (0)