mirror of
https://github.com/rancher/rke.git
synced 2025-09-19 18:30:38 +00:00
Skip check for private key if using ssh agent
This commit is contained in:
committed by
Alena Prokharchyk
parent
4b3068d673
commit
8f47078988
@@ -40,7 +40,7 @@ func newDialer(h *Host, kind string) (*dialer, error) {
|
|||||||
netConn: "tcp",
|
netConn: "tcp",
|
||||||
useSSHAgentAuth: h.SSHAgentAuth,
|
useSSHAgentAuth: h.SSHAgentAuth,
|
||||||
}
|
}
|
||||||
if bastionDialer.sshKeyString == "" {
|
if bastionDialer.sshKeyString == "" && !bastionDialer.useSSHAgentAuth {
|
||||||
var err error
|
var err error
|
||||||
bastionDialer.sshKeyString, err = privateKeyPath(h.BastionHost.SSHKeyPath)
|
bastionDialer.sshKeyString, err = privateKeyPath(h.BastionHost.SSHKeyPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -59,7 +59,7 @@ func newDialer(h *Host, kind string) (*dialer, error) {
|
|||||||
bastionDialer: bastionDialer,
|
bastionDialer: bastionDialer,
|
||||||
}
|
}
|
||||||
|
|
||||||
if dialer.sshKeyString == "" {
|
if dialer.sshKeyString == "" && !dialer.useSSHAgentAuth {
|
||||||
var err error
|
var err error
|
||||||
dialer.sshKeyString, err = privateKeyPath(h.SSHKeyPath)
|
dialer.sshKeyString, err = privateKeyPath(h.SSHKeyPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user