# Path: conf/ssh_conf.py
# HOST='Enter your host details here'
# USERNAME='Enter your username here'
# PASSWORD='Enter your password here'
# PORT = 22
# TIMEOUT = 10
# PKEY = 'Enter your key filename here'
# COMMANDS = ['ls;mkdir sample']
# UPLOADREMOTEFILEPATH = '/etc/example/filename.txt'
# UPLOADLOCALFILEPATH = 'home/filename.txt'
# DOWNLOADREMOTEFILEPATH = '/etc/sample/data.txt'
# DOWNLOADLOCALFILEPATH = 'home/data.txt'


import paramiko
import os,sys
import socket
from conf import ssh_conf as conf_file
"""
Qxf2 Services: Utility script to ssh into a remote server
* Connect to the remote server
* Execute the given command
* Upload a file
* Download a file
"""

sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

class Ssh_Util:
    "Class to connect to remote server"

    def __init__(self):
        self.ssh_output = None
        self.ssh_error = None
        self.client = None

# Path: conf/ssh_conf.py
# HOST='Enter your host details here'
# USERNAME='Enter your username here'
# PASSWORD='Enter your password here'
# PORT = 22
# TIMEOUT = 10
# PKEY = 'Enter your key filename here'
# COMMANDS = ['ls;mkdir sample']
# UPLOADREMOTEFILEPATH = '/etc/example/filename.txt'
# UPLOADLOCALFILEPATH = 'home/filename.txt'
# DOWNLOADREMOTEFILEPATH = '/etc/sample/data.txt'
# DOWNLOADLOCALFILEPATH = 'home/data.txt'


# Path: utils/ssh_util.py
import paramiko
import os,sys
import socket
from conf import ssh_conf as conf_file

"""
Qxf2 Services: Utility script to ssh into a remote server
* Connect to the remote server
* Execute the given command
* Upload a file
* Download a file
"""

sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

class Ssh_Util:
    "Class to connect to remote server"

    def __init__(self):
        self.ssh_output = None
        self.ssh_error = None
        self.client = None

        self.host= conf_file.HOST