actions.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:transfert 作者: rbernand 项目源码 文件源码
def _simple_scp(method, source, dest):
        remote = source if method == 'get' else dest
        client = paramiko.SSHClient()
        client.load_system_host_keys()
        client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
        client.connect(remote.url.host, remote.url.port or 22, remote.url.user, remote.url.password)
        scpc = scp.SCPClient(client.get_transport())
        getattr(scpc, method)(source.url.path, dest.url.path)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号