Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import paramiko
- import os
- hostname = "student.agh.edu.pl"
- port = 22
- username = "wrachwal"
- password = "2Defe*kac"
- local_path = 'path.txt'
- remote_path = 'python/path.txt'
- client = paramiko.SSHClient()
- client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- client.connect(hostname, port, username, password)
- sftp = client.open_sftp()
- sftp.put(local_path, remote_path)
- sftp.close()
- client.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement