I have an vps ,my local pc is in the local area network. When paramiko installed on my local pc ,i can get file from my vps.

import paramiko
t = paramiko.Transport(("vps ip",22))
t.connect(username = "username", password = "key")
sftp = paramiko.SFTPClient.from_transport(t)
remotepath='/tmp/test.txt'
localpath='/tmp/test.txt'
sftp.get(remotepath,localpath)

Now the problem is :how can i get the file on my local pc from vps ip with paramiko or by some other way?

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to