a guest May 16th, 2018 116 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- import sys
- import paramiko
- import os
- hostname = "student.agh.edu.pl"
- port = 22
- username = "mpadula"
- password = "ce9dibo:x:"
- paaaas=raw_input('Enter password:')
- local_path = 'xdd.txt'
- remote_path = 'python/test/xdd.txt'
- client = paramiko.SSHClient()
- client.connect(hostname, port, username, paaaas)
- except paramiko.SSHException as ex:
- sys.exit("Podales zle haslo!!!")
- sftp = client.open_sftp()
- stdin, stdout, stderr = client.exec_command("ls -a")
- for line in stdout:
RAW Paste Data