Skip to content Skip to sidebar Skip to footer

How To Use Paramiko To Transfer Files Between Two Remote Servers?

Please let me know how do I use paramiko module to transfer files between two remote hosts. I have seen that 'get' method will get the files from remote host to local host. 'put' m

Solution 1:

Paramiko.sftp_client.SFTPClient provides SFTP (Secure File Transfer Protocol) features to move files between computers. After starting an sftp session via

ssh = client.open_sftp(),

you can access all of these methods.

If you just want to move files on the remote host, then you can use "local" file transfer methods with shutil. Hope that helped!

Post a Comment for "How To Use Paramiko To Transfer Files Between Two Remote Servers?"