Skip to content

Commit

Permalink
Merge pull request #8 from weka/ovt24_2
Browse files Browse the repository at this point in the history
fix for password auth
  • Loading branch information
vince-weka authored Oct 4, 2024
2 parents 29de897 + ec41371 commit a29c933
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wekapyutils/wekassh.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(self, hostname):
self._hostname = hostname
self.exc = None
self.user = None
self.password = ""
self.password = None
self.connected = False

self.config = fabric.Config(overrides={'authentication': {'strategy_class': OpenSSHAuthStrategy}})
Expand All @@ -64,7 +64,7 @@ def connect(self, forward_agent=False):
failures = 0
#self.kwargs = {"forward_agent": forward_agent}
while True:
if self.password is not None:
if self.password is not None and len(self.password) > 0:
self.config = fabric.Config() # reset the config to clear the auth strategy
self.kwargs["password"] = self.password
try:
Expand Down

0 comments on commit a29c933

Please sign in to comment.