diff --git a/plugin.go b/plugin.go index 6be2781..d4ed728 100644 --- a/plugin.go +++ b/plugin.go @@ -161,7 +161,7 @@ func (p *Plugin) Exec() error { return errors.New("missing ssh config (Host, Username)") } - if len(p.Config.Password) != 0 || len(p.Config.Key) != 0 { + if len(p.Config.Password) != 0 && len(p.Config.Key) != 0 { return errors.New("can't set password and key at the same time") }