Recursive directory download with Paramiko?

后端 未结 6 1505
甜味超标
甜味超标 2020-11-30 10:23

I want to download a directory with unknown contents recursively via SSH and have been trying Paramiko. I have seen several examples how to upload directories but none that

6条回答
  •  眼角桃花
    2020-11-30 11:08

    Paramiko does not support recursive operations.

    You can use pysftp. It's a wrapper around Paramiko that has more Python-ish look and feel and supports recursive operations. See

    • pysftp.Connection.put_r()
    • pysftp.Connection.get_r()

    Or you can just base your code on pysftp source code. Or see my answer to Python pysftp get_r from Linux works fine on Linux but not on Windows.

提交回复
热议问题