Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
__copyright__ = '(c) Oleg Butovich 2013-2017'
__licence__ = 'MIT'
import os
from proxmoxer.backends.base_ssh import ProxmoxBaseSSHSession, BaseBackend
try:
import paramiko
except ImportError:
import sys
sys.stderr.write("Chosen backend requires 'paramiko' module\n")
sys.exit(1)
class ProxmoxParamikoSession(ProxmoxBaseSSHSession):
def __init__(self, host,
username,
password=None,
private_key_file=None,
port=22,
timeout=5,
sudo=False):
self.host = host
self.username = username
self.password = password
self.private_key_file = private_key_file
self.port = port
self.timeout = timeout
self.sudo = sudo
self.ssh_client = self._connect()
__author__ = 'Oleg Butovich'
__copyright__ = '(c) Oleg Butovich 2013-2017'
__licence__ = 'MIT'
from proxmoxer.backends.base_ssh import ProxmoxBaseSSHSession, BaseBackend
try:
import openssh_wrapper
except ImportError:
import sys
sys.stderr.write("Chosen backend requires 'openssh_wrapper' module\n")
sys.exit(1)
class ProxmoxOpenSSHSession(ProxmoxBaseSSHSession):
def __init__(self, host,
username,
configfile=None,
port=22,
timeout=5,
forward_ssh_agent=False,
sudo=False,
identity_file=None):
self.host = host
self.username = username
self.configfile = configfile
self.port = port
self.timeout = timeout
self.forward_ssh_agent = forward_ssh_agent
self.sudo = sudo
self.identity_file = identity_file