Skip to content

Commit

Permalink
fix: auth value check
Browse files Browse the repository at this point in the history
  • Loading branch information
Tpuljak committed Mar 6, 2024
1 parent c678e69 commit 6175037
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/ssh_tunnel/util/forward_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ func ForwardRemoteUnixSock(ctx context.Context, targetOptions types.TargetOption
sshTun.SetUser(*targetOptions.RemoteUser)
}

if targetOptions.RemotePassword != nil {
if targetOptions.RemotePassword != nil && *targetOptions.RemotePassword != "" {
sshTun.SetPassword(*targetOptions.RemotePassword)
} else if targetOptions.RemotePrivateKey != nil {
} else if targetOptions.RemotePrivateKey != nil && *targetOptions.RemotePrivateKey != "" {
privateKeyPath, password, err := GetSshPrivateKeyPath(*targetOptions.RemotePrivateKey)
if err != nil {
log.Fatal(err)
Expand Down

0 comments on commit 6175037

Please sign in to comment.