开发者

Paramiko equvalent of pipline controls and input/output pipes

开发者 https://www.devze.com 2022-12-17 17:36 出处:网络
I n开发者_JS百科eed a method of paramiko based file transfer with a lightweight SSH2 server (dropbear) which has no support for SCP or SFTP. Is there a way of achieving a cat and redirect style file t

I n开发者_JS百科eed a method of paramiko based file transfer with a lightweight SSH2 server (dropbear) which has no support for SCP or SFTP. Is there a way of achieving a cat and redirect style file transfer, such as:

ssh server "cat remote_file" > local_file

with paramiko channels?

Can paramiko.Transport.open_channel() or Message() do the job? I am unsure of how to proceed.


If the limitation, as you say, is only in your client, you can easily implement a SFTP client directly with paramiko -- e.g., look at this example code.


pyfilesystem implements an sftp filesystem on top of paramiko.

0

精彩评论

暂无评论...
验证码 换一张
取 消