from NL.ComputerScienceUtilities.SSHConnection import SSHConnection
import os

# -------------------------------------- #
# Edit only these 3 settings
# -------------------------------------- #
key_dir  = 'path_to_SSH_keys'
hostname = 'HOST.CLUSTER.EDU'
username = 'my_user_name'

# -------------------------------------- #
port = 22
ok = os.path.isdir(key_dir)
if ok:
    print("Sucessfully found local dir with SSH keys.")
    con = SSHConnection(hostname, port, username, key_dir)
    con.connect()
    ok = con.isConnected()
    
    if ok:
        print("Connection succesful.")
else:
    print("Error: Could not find local dir with SSH keys.")
# -------------------------------------- #