Blob Blame History Raw
commit cfd1f7490d7958ee25ad5937c9f2072adaa9862e
Author: Marek 'marx' Grac <mgrac@redhat.com>
Date:   Mon Jan 6 13:25:43 2014 +0100

    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.

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: