summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek 'marx' Grac <mgrac@redhat.com>2014-01-06 12:25:43 (GMT)
committerMarek 'marx' Grac <mgrac@redhat.com>2014-01-06 12:30:51 (GMT)
commitcfd1f7490d7958ee25ad5937c9f2072adaa9862e (patch)
treedc16b1aae82e5826abc92f025a62627884d7dece
parent6484b090d44811c4d2d2f59f62444ab44346c200 (diff)
downloadfence-agents-cfd1f7490d7958ee25ad5937c9f2072adaa9862e.zip
fence-agents-cfd1f7490d7958ee25ad5937c9f2072adaa9862e.tar.gz
fence-agents-cfd1f7490d7958ee25ad5937c9f2072adaa9862e.tar.xz
fencing: Do not use public keys when identity-file is not defined
Previously, fence agent (ssh) tried to use keys before it asks for password. This lead to a situation when fence agent did not work correctly as it was waiting for 'Password' which did not occur.
-rw-r--r--fence/agents/lib/fencing.py.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index a570203..c8b9bda 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -979,7 +979,7 @@ def fence_login(options, re_login_string = "(login\s*: )|(Login Name: )|(userna
syslog.syslog(syslog.LOG_ERR, str(ex))
sys.exit(EC_GENERIC_ERROR)
elif options.has_key("--ssh") and 0 == options.has_key("--identity-file"):
- command = '%s %s %s@%s -p %s' % (SSH_PATH, force_ipvx, options["--username"], options["--ip"], options["--ipport"])
+ command = '%s %s %s@%s -p %s -o PubkeyAuthentication=no' % (SSH_PATH, force_ipvx, options["--username"], options["--ip"], options["--ipport"])
if options.has_key("--ssh-options"):
command += ' ' + options["--ssh-options"]
try: