当前位置:网站首页>ssh工具 pyqt
ssh工具 pyqt
2022-06-30 15:49:00 【AI视觉网奇】
上传下载
import paramiko
trans = paramiko.Transport(
sock=("10.10.21.177",22)
)
trans.connect(
username="root",
password="12345"
)
sftp = paramiko.SFTPClient.from_transport(trans)
#上传
#把本地的文件settings.py,上传到远端为/root/Desktop/settings.py
sftp.put("settings.py","/root/Desktop/settings.py")
#下载
#从远程/root/Desktop/hh.py获取文件下载到本地名称为hh.py
# sftp.get("/root/Desktop/hh.py","hh.py")
sftp.close()
原文链接:https://blog.csdn.net/qq_39112101/article/details/94175083
原文还有多线程应用
https://github.com/c0hb1rd/SSHTool


边栏推荐
猜你喜欢

八大基本排序(详解)

JSR303以及常见Validator实现

搬运两个负载均衡的笔记,日后省的找

腾讯二面:@Bean 与 @Component 用在同一个类上,会怎么样?

More dragon lizard self-developed features! Production available Anolis OS 8.6 officially released

AVIC UAV technology innovation board is listed: the fist product with a market value of 38.5 billion is pterodactyl UAV

IO stream_ recursion

数据挖掘知识点整理(期末复习版)

TCP socket and TCP connection

Rongsheng biology rushes to the scientific innovation board: it plans to raise 1.25 billion yuan, with an annual revenue of 260million yuan
随机推荐
[JVM] class loading related interview questions - class loading process and parental delegation model
居家办公浅谈远程协助快速提效心得 | 社区征文
Deep learning - (2) several common loss functions
pref使用记录
idea必用插件
“推广+搞笑剧情”,如何碰撞出爆款的火花?
dart:字符串replace相关的方法
Halcon knowledge: regional topics [07]
Tutoriel etcd - chapitre 8 API compacte, Watch et lease pour etcd
RT-Thread 堆区大小设置
《网络是怎么样连接的》读书笔记 - 汇总篇
TCP Socket与TCP 连接
【微信小程序】小程序的宿主环境
巩固入门-C#基础变量和常量
Raft introduction
STL教程7-set、pair对组和仿函数
删除有序数组中的重复项 II[双指针--多情况统一]
nichenet实战silicosis
List announced - outstanding intellectual property service team in China in 2021
Etcd tutorial - Chapter 8 compact, watch, and lease APIs for etcd