import paramiko

IP = '192.168.127.12'
USER = 'pruebaURJC'
PASSWORD = '<PASSWORD>'

try:
    ssh = paramiko.SSHClient()
    ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
    ssh.connect(IP, port=22, username=USER, password=PASSWORD)
    sftp = ssh.open_sftp()
    sftp.get('./Clases.py','Clases.py')
    sftp.get('./__init__.py','__init__.py')
    sftp.close()
    ssh.close()
except KeyboardInterrupt:
    print('Fallo')
import paramiko

IP = '192.168.127.12'
USER = 'pruebaURJC'
PASSWORD = '<PASSWORD>'

try:
    ssh = paramiko.SSHClient()
    ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
    ssh.connect(IP, port=22, username=USER, password=PASSWORD)
    sftp = ssh.open_sftp()
    sftp.get('./Clases.py','Clases.py')
    sftp.get('./__init__.py','__init__.py')
    sftp.close()
    ssh.close()
except KeyboardInterrupt:
    print('Fallo')