|
|
@ -13,6 +13,8 @@ from subprocess import Popen, PIPE |
|
|
|
logger = logging.getLogger(__name__) |
|
|
|
|
|
|
|
|
|
|
|
@zope.interface.implementer(interfaces.IAuthenticator) |
|
|
|
@zope.interface.provider(interfaces.IPluginFactory) |
|
|
|
class Authenticator(common.Plugin): |
|
|
|
"""SSH Authenticator. |
|
|
|
|
|
|
@ -22,8 +24,6 @@ class Authenticator(common.Plugin): |
|
|
|
HTTP. |
|
|
|
|
|
|
|
""" |
|
|
|
zope.interface.implements(interfaces.IAuthenticator) |
|
|
|
zope.interface.classProvides(interfaces.IPluginFactory) |
|
|
|
|
|
|
|
description = "Send authentication tokens through SSH" |
|
|
|
|
|
|
@ -58,7 +58,7 @@ class Authenticator(common.Plugin): |
|
|
|
|
|
|
|
ssh = Popen(["ssh", self.conf("server"), self.conf("remote-command")], |
|
|
|
stdin=PIPE) |
|
|
|
ssh.stdin.write(lines) |
|
|
|
ssh.stdin.write(lines.encode('UTF-8')) |
|
|
|
ssh.stdin.close() |
|
|
|
ssh.wait() |
|
|
|
|
|
|
|