Skip to content

Commit

Permalink
Merge pull request #1128 from BishopFox/fix/ssh-kerberos
Browse files Browse the repository at this point in the history
Fix `ssh` command
  • Loading branch information
rkervella authored Mar 3, 2023
2 parents 71f9492 + e3a2ff8 commit b0a917c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions client/command/exec/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ func SSHCmd(ctx *grumble.Context, con *console.SliverConsoleClient) {
con.PrintErrorf("You must specify a keytab file with the --kerberos-keytab flag\n")
return
}
kerberosKeytab, err := os.ReadFile(kerberosKeytabFile)
if err != nil {
con.PrintErrorf("%s\n", err)
return
kerberosKeytab := []byte{}
if kerberosKeytabFile != "" {
kerberosKeytab, err = os.ReadFile(kerberosKeytabFile)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
}

if password == "" && len(privKey) == 0 && !ctx.Flags.Bool("skip-loot") {
Expand Down

0 comments on commit b0a917c

Please sign in to comment.