目录

远程桌面工具:MobaXterm_Installer_v20.3.zip

paramiko上传下载 并远程执行命令

paramiko 远程命令:

SSHTool


远程桌面工具:MobaXterm_Installer_v20.3.zip

百度网盘有,优点:左边是xftp,右边是命令行窗口

xshell软件中,xftp和ssh命令窗口是分开的。

paramiko上传下载 并远程执行命令

import osimport paramikotrans = paramiko.Transport(sock=("192.168.10.11", 220))trans.connect(username="root", password="root")
sftp = paramiko.SFTPClient.from_transport(trans)def down_from_txt(txt_path,out_dir):with open(txt_path,'r') as f_r:lines=f_r.readlines()for data in lines:path=data.split(" ")[0]cls_index=data.split(" ")[1].replace("\n","")out_to=out_dir+cls_indexfile_name=os.path.basename(path)os.makedirs(out_to,exist_ok=True)sftp.get(path,   out_to+'/'+ file_name)def get_ssh():ssh = paramiko.SSHClient()ssh._transport = transreturn ssh
def down_product():ssh=get_ssh()stdin, stdout, stderr = ssh.exec_command('cd data/demo && python3 demo.py')print(stdout.read().decode('utf-8'))ssh.close()def list_dir(dir_path='/data/demo/out'):ssh = get_ssh()stdin, stdout, stderr = ssh.exec_command(f'cd {dir_path} && ls')print(stdout.read().decode('utf-8'))ssh.close()
if __name__ == '__main__':list_dir()#down_from_txt(r'D:\project\data\val_clf_sampler_demo.txt',r'D:\data\good_size/')
# 上传
# 把本地的文件settings.py,上传到远端为/root/Desktop/settings.py
# sftp.put("settings.py" ,"/root/Desktop/settings.py")sftp.close()

原文链接:https://blog.csdn.net/qq_39112101/article/details/94175083

原文还有多线程应用

paramiko 远程命令:

原文链接:https://blog.csdn.net/weixin_45294285/article/details/122846537

# encoding: utf-8
import numpy as np
import paramiko
import time
def creatSShConnectOb(hostname, username, password, port=22):ssh = paramiko.SSHClient()ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())try:ssh.connect(hostname, port, username=username, password=password, timeout=60) #  timeout protectionreturn sshexcept:print('Warning:\nFist connect the {} failed, now will retry!'.format(hostname))ssh.connect(hostname, port, username=username, password=password, timeout=60) #  timeout re-tryprint('Error:\nAttempt to connect ABC failed!!! Please check the IP / port/ account / password.')def chanel_exe_cmd(ChanelSSHOb, cmd, t=0.1):ChanelSSHOb.send(cmd)ChanelSSHOb.send("\n")time.sleep(t)resp = ChanelSSHOb.recv(9999).decode("utf8")print("#"*40)return respif __name__ == '__main__':ssh = creatSShConnectOb(hostname="192.168.110.16", username="root", password="xxx")chanelSSHOb = ssh.invoke_shell()result = chanel_exe_cmd(chanelSSHOb, "pwd")print(result)result = chanel_exe_cmd(chanelSSHOb, "cd /data")print(result)result = chanel_exe_cmd(chanelSSHOb, "pwd")print(result)

SSHTool

https://github.com/c0hb1rd/SSHTool

https://github.com/movade005/pyqt-ssh-tool

ssh工具paramiko pyqt工具相关推荐

  1. SSH-Auditor:一款SSH弱密码探测工具

    SSH-Auditor:一款SSH弱密码探测工具 freebuf 2018-09-16  ssh-auditor是一款可帮助你探测所在网络中ssh弱密码的工具. 特性 以下操作ssh-auditor都 ...

  2. mac 连接linux sh,ssh工具 – windows和mac 上ssh连接linux 服务器工具推荐 – The Hu Post...

    Views: 1,051 内容概要: ssh工具 xshell finalshell关于生产力的更多内容, 可以看看我的专栏 一些效率工具可以可以看看我整理的常用工具推荐. ssh工具 在工作中经常回 ...

  3. XManager5 ssh远程登录服务器工具xshell ,服务器资源上传下载工具xftp

    XManager5 网盘下载 链接:https://pan.baidu.com/s/1t1wL3xnsucoP6hDnP30INA 提取码:9cq3 安装后 打开 ssh 远程登录服务器工具 xshe ...

  4. ssh xm 工具_常用连接Linux的SSH工具、SFTP工具

    常用连接Linux的SSH工具.SFTP工具 一.SSH工具 1.1SecureCRT SecureCRT是一款支持SSH(SSH1和SSH2)的终端仿真程序,简单地说是Windows下登录UNIX或 ...

  5. 系统封装工具_去工具化/脚本化理解,自动化运维落地最佳实践之业务/架构/模型/方法...

    本文转载自:互联网运维杂谈 近年来后端IT也呈现更复杂的形态,底层IT架构逐渐开放平台化.云化,上层应用微服务化等等,虚拟化.云平台.容器PaaS和云原生框架都进入到IT运行环境中,而传统业务依然运行 ...

  6. 属性匹配工具_测试工具链——高效构建Mock服务

    现在,WEB系统的开发一般都采用前后端分离的架构,以及部分公司采用"前台-中台-后台"的组织架构,难免会出现开发进度不一致的情况,导致系统联调或测试需要等到所有依赖开发完成后才能够 ...

  7. linux平台软件动态分析工具valgrind系列工具及其可视化

    linux平台软件动态分析工具valgrind系列工具 Memcheck–内存检查工具 Callgrind–函数调用分析工具 Cachegrind–缓存命中分析工具 Helgrind–线程分析工具 M ...

  8. 注释工具_干货:PS工具介绍“计算工具+注释工具”

    计数工具 计数工具:计数工具的作用其实就是计数,比如一张包含有若干人像的照片,而这个时候你需要知道该图像中到底有多少人!那么计数工具将会给你带来极大的方便. 打开一张需要计数的文件,在工具栏中找到计数 ...

  9. 【Windows 逆向】OD 调试器工具 ( OD 工具简介 | OD 工具与 CE 工具对比 )

    文章目录 一.OD 工具简介 二.OD 工具与 CE 工具对比 三.博客资源 一.OD 工具简介 OD 全程是 PLLYDBG , 动态追踪工具 , 是目前最流行的 调试解密 工具 ; 该工具支持插件 ...

最新文章

  1. 注意ajax的同步和异步请求
  2. vue 接口数据排序_Vue 使用 axios 请求 mock 模拟接口的数据
  3. javascript event详解
  4. Smarty 入手学习教程
  5. 5G人才平均月薪水涨船高!通信研发工程师需求最旺
  6. 将Fortran程序转化成大写[cwp]
  7. Linux中的 real user, effective user, saved set user 三种用户ID
  8. JavaScript等同于printf / String.Format
  9. PHP下简单交换两个变量
  10. 六石管理学:行政人员也要学会使用SVN保存文档
  11. html中无序列表做成链接,Beautifulsoup从无序列表中提取文本和链接divulli(斯堪的纳维亚字符)...
  12. Java对List集合排序
  13. SQL server 数据库 实验一
  14. 箱线图怎么判断异常值_箱线图(Box-plot)中,异常值很多说明什么?
  15. 正确认识计算机专业,如何正确认识计算机科学与技术专业
  16. Python 模拟轮盘抽奖游戏
  17. 2020湖南省技能竞赛获奖名单_心理知识竞赛获奖名单新鲜出炉
  18. java学习5:公告管理案例
  19. Java中使用HTTP编程实现网络爬虫
  20. 用C语言验证“6174数学黑洞之谜

热门文章

  1. Linux中mysql密码重置
  2. vscode下载安装和配置c/c++环境
  3. Unity Photon服务器
  4. 2022-02-22 FeHelper插件的安装
  5. html div 圆角边框,div圆角边框
  6. mybatis异常:Could not find result map Java.util.Map 问题分析及解决
  7. 怎么快速查询UPS多个单号物流信息
  8. 微信开发者工具Bug
  9. ubuntu无法安装增强功能解决方法
  10. 8.17 婚礼上的小杉 1533