Trisurf Monte Carlo simulator
Samo Penic
2016-05-15 e1b97dcc9d4ad47bf4ceab66466fde2ce895cbe0
Added a file paramikoTest.py, an attempt to make remote connection
1 files added
14 ■■■■■ changed files
python/paramikoTest.py 14 ●●●●● patch | view | raw | blame | history
python/paramikoTest.py
New file
@@ -0,0 +1,14 @@
#!/usr/bin/python3
import paramiko
ssh = paramiko.SSHClient()
#ssh.load_host_keys(os.path.expanduser(os.path.join("~", ".ssh", "known_hosts")))
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('hostname', username='', password='',port=22,timeout=5)
stdin, stdout, stderr = ssh.exec_command('df -h')
x=stdout.readlines()
sftp = ssh.open_sftp()
#sftp.put(localpath, remotepath)
sftp.close()
ssh.close()
print (x)