Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要一种基于 paramiko 的文件传输方法,该方法使用不支持SCP或SFTP的轻量级SSH2服务器 ( dropbear ) 。有没有办法实现cat和redirect风格的文件传输,比如:
ssh server "cat remote_file" > local_file
与paramiko频道?
paramiko.Transport.open_channel() 或 Message() 可以完成这项工作吗?我不确定如何进行。
pyfilesystem 在 paramiko 之上实现了一个sftp 文件系统。
如果限制,如您所说,仅在您的客户端中,您可以轻松地直接使用 paramiko 实现 SFTP 客户端 - 例如,查看此示例代码。