远程SHELL执行框架 sshxcute

SHELL多线程和单线程脚本框架(简单易上手) 阅读详情
远程SHELL执行框架 sshxcute

这个框架对于测试人员来讲绝对是福音!干货!也特别适合我们公司的产品。

基于UI的Selenium,QTP等自动化测试框架对于底层的一些回显操作显然有点力不从心,这时候我们只有开发独立的测试工具来针对我们公司的产品。

比如通过SSH远端执行一些命令并返回设备应该返回的信息,完成自动化过程。

JSch 是 SSH2 的一个纯 Java 实现。它可以连接到一个 sshd 服务器,使用端口转发,X11 转发,文件传输等等。但是这个类库毕竟偏向底层,上手与实际运行起来不太方便,sshxcute 框架正是基于 JSch 封装的,提供了更为便捷的 API 借口,更加灵活实用的功能,从而可以让开发与测试人员更加得心应手的使用。sshxcute 是一个框架,它允许工程师利用 Java 代码通过 SSH 连接远程执行 Linux/UNIX 系统上的命令或者脚本,这种方式不管是针对软件测试还是系统部署,都简化了自动化测试与系统环境部署的步骤。

SSHXCUTE 的设计旨在:

  • 最小的系统需求 – 仅仅开启 SSH 连接即可。
  • 易用性 – 工程师利用 Java 代码执行命令或脚本。
  • 内置命令 / 脚本任务执行功能。
  • 易扩展 – 用户可以自定义任务类型并集成于 sshxcute 框架。

项目主页:https://code.google.com/p/sshxcute/

如果sshxcute支持更多的语言就更棒了,不过他的API接口简单易用,稍微有点JAVA基础应该就能完成一些自动化测试工具的开发,用于跟我们公司的硬件产品进行底层交互。

java操作linux工具包 立即下载

相关推荐

java连接linux,执行shell命令的工具类 sshxcute.jar

java连接linux,执行shell命令的工具类 sshxcute.jar

sshxcute_Java 使用SSH连接Linux 使用passwd命令修改密码

[ 通过使用远程SHELL执行框架 sshxcute 实现远程登录Linux并执行命令。 sshxcute 项目地址: http://code.google.com/p/sshxcute/ 示例代码: import net.neoremind[1、passwd 简单说明;我们已经学会如何添加用户了,所以我们还要学习设置或修改用户的密码;passwd命令的用法也很多,我们只选如下的几个...

weixin_39985286的博客 364

Java_开发与测试人员的远程执行框架sshxcute.pdf

sshxcute框架,实现远程控制,可用于linux下的远程控制框架

Shell脚本学习-Shell脚本框架

Shell脚本学习

CCH2024的专栏 470

sshxcute_--java远程执行linuxunix命令的工具类_sshxcute.zip

sshxcute_--java远程执行linuxunix命令的工具类_sshxcute

Silvaco 学习笔记——物理模型:载流子产生复合模型

对载流子的复合机制进行总结

reactortiger的博客 1万+

使用sshxcute来操作ssh端

本文介绍使用sshxcute的JAR包,通过SSH协议在远程Linux/Unix系统上执行命令 1、JAR准备 下载地址 文件分享https://share.weiyun.com/ZGkRvUQ9

qq_15083919的博客 1000

3款 433MHz 收发模块对比:SYN480R vs RXB6 vs DL-TX19,实测卷帘门遥控距离

本文深度评测了3款433MHz收发模块SYN480R、RXB6与DL-TX19在卷帘门遥控距离、穿透性能和抗干扰能力等方面的表现。通过实测数据对比,分析了超外差、超再生和PLL锁相环技术的优劣,为智能家居和工业控制领域的无线遥控方案选型提供专业参考。

weixin_30700977的博客 393

java远端执行shell命令之系统上任务的框架 -- sshxcute

需求描述:在实际工作中,总会有些时候需要我们通过java代码通过远程连接去linux服务器上面执行一些shell命令,包括一些集群的状态管理,执行任务,集群的可视化界面操作等等,所以我们可以通过java代码来执行linux服务器的shell命令 为了解决上述问题,google公司给提出了对应的解决方案,开源出来了一个jar包叫做sshxcute,通过这个jar包我们可以通过java代码,非常便捷的操作我们的linux服务器了 使用介绍 项目中idea手动添加依赖,非pom 开发演示 import net.

zhiwen 853

小白学电路之cadance搭建buffer电路

Buffer(缓冲器)是一种放大器或驱动电路,主要用于隔离输入和输出,以防止负载对前级电路造成干扰或影响。本文作者在电路方面是小白水平,目前正在学习,有不足之处欢迎指正。3.创建新的cellview,对此buffer进行仿真验证。2.创建buffer的symbol。电路中的V2的详细参数。

weixin_58051657的博客 1984

Dataset - DeepFashion 服装数据集

Dataset - DeepFashion 服装数据集 [Dataset - DeepFashion] [Project - DeepFashion] 1. 服装类别和属性预测集 [Category - Attribute 下载] [百度网盘] 289,222 张服装图片 clothes images; 50 个服装类别 clothing categories 1,000 ...

长风破浪会有时,直挂云帆济沧海 2万+

第3节 sqoop:7、通过java代码远程连接linux执行shell命令

数据库的数据同步软件sqoop 数据同步 关系型数据库到大数据平台 任务:sqoop 是批量导入数据太慢,如何做到实时的数据同步 实时的数据同步工具: canal 阿里开源的一个数据库数据实时同步的软件,解析mysql的binlog日志进行数据同步 streamset 数据库的数据同步工具 flume 采集mysql的变化的数据,github上面有这样的一个项目,自...

dengmanzhou3124的博客 338

OpenBullet2 学习研究2-Conditions条件之KeyCheck的使用

上一节我们学习了如何安装Openbullet2以及如何新建一个配置,最后我们再配置里面新建一个Http的请求块,帮助我们发送了第一个请请求。这一节我们来学习check块。当我们发送请求以后,请求返回的内容是否是我们想要的,或者请求发送正确没有,这个我们怎么判断呢?这个时候就要用到check块了。

958

【Hadoop离线基础总结】通过Java代码执行Shell命令

通过Java代码执行Shell命令 需求 在实际工作中,总会有些时候需要我们通过java代码通过远程连接去linux服务器上面执行一些shell命令,包括一些集群的状态管理,执行任务,集群的可视化界面操作等等,所以我们可以通过java代码来执行linux服务器的shell命令 为了解决上述问题,google公司给提出了对应的解决方案,开源出来了一个jar包叫做 sshxcute,通过这个jar...

关于我转生变成程序猿这档事 282

Ubuntu 24.04 搭建 Squid 代理服务器终极指南:从入门到 HTTPS 缓存AI模型

本文详细指导在Ubuntu 24.04系统部署Squid代理服务器,实现AI大模型文件的高效缓存。重点内容包括:1) 安装squid及必备的squid-openssl扩展包;2) 配置HTTPS拦截(SSL-Bumping)功能,创建CA证书和SSL数据库;3) 优化缓存策略,设置4TB存储空间并强制缓存常见大文件格式;4) 结合华为防火墙实现透明代理。文章特别强调实际部署中的关键注意事项和常见错误解决方案,如证书路径配置、权限设置等问题,帮助用户快速搭建企业级缓存代理服务。

zlt315的博客 1920

解码器选型参数,结构原理,工艺与注意问题总结

解码器芯片(Decoder Chip)是电子设备中的一个重要组件,通常用于处理、解释和输出存储在某种编码格式中的数据或信号。本文对解码器的工作原理,结构特点,工艺流程,选型参数及设计注意事项进行总结。

fydar的博客 1170

通过java代码执行shell命令的小案列

一 需求描述: 通常我们操作linux服务器都是通过远程连接工具,比如:SecureCRT,Xmanager等工具,在其上输入命令来完成一些工作,但是在实际工作中,有些时候需要我们通过java代码远程连接到linux服务器执行一些shell命令,包括集群的状态管理,执行任务,以及集群的可视化界面操作等等。为了解决上述的问题,google公司开源了一个项目叫做sshxcute,通过这个jar包可以...

travellingMan的博客 334

[SV]SystemVerilog状态机实现案例

本文介绍了SystemVerilog中状态机的实现方法。首先使用枚举类型定义状态(TOP_HIB、TOP_BG、TOP_LDO、TOP_NOR),然后通过三个主要任务实现状态机:1)格式化现态寄存器处理状态转换;2)描述状态转移条件,包括计时器和稳定时间判断;3)基于当前状态和输入信号确定次态。状态机在时钟边沿或复位时更新状态,实现了从休眠到正常工作状态的转换逻辑,包含电源稳定时间检测等关键功能。

元直的博客 2020

java执行shell命令

java执行shell命令 需求描述:在实际工作中,总会有些时候需要我们通过java代码通过远程连接去linux服务器上面执行一些shell命令,包括一些集群的状态管理,执行任务,集群的可视化界面操作等等,所以我们可以通过java代码来执行linux服务器的shell命令 为了解决上述问题,google公司给提出了对应的解决方案,开源出来了一个jar包叫做sshxcute,通过这个jar包我们可以...

lsy107816的博客 2137

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

java代码执行shell命令

java代码执行shell命令,需要通过google出品的工具类ssxcute.jar,下载地址: https://download.youkuaiyun.com/download/qq_15076569/10797217 java代码操作shell代码: import net.neoremind.sshxcute.core.ConnBean; import net.neoremind.sshxcu...

qq_15076569的博客 1180

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

Ganymed SSH-2 for Java系列3之执行远程shell 命令

利用Ganymed SSH-2 for Java 连接到远程服务器,然后执行shell命令; 首先我们再在之前CommandRunner类中再添加一个执行shell命令的方法,具体如下所示: public static String execShellScript(String host, String username, String password,

4521

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Java使用SSH执行Linux命令

通过使用远程SHELL执行框架 sshxcute 实现远程登录Linux并执行命令。 sshxcute 项目地址: http://code.google.com/p/sshxcute/   示例代码: import net.neoremind.sshxcute.core.ConnBean; import net.neoremind.sshxcute.core.Result; imp...

浪子恒心 337

java ssh linux命令,Java使用SSH执行Linux命令

通过使用远程SHELL执行框架 sshxcute 实现远程登录Linux并执行命令。sshxcute 项目地址:http://code.google.com/p/sshxcute/示例代码:import net.neoremind.sshxcute.core.ConnBean;import net.neoremind.sshxcute.core.Result;import net.neoremin...

weixin_39922534的博客 130
上一篇: 调试WebService接口的小工具-storm
下一篇: MyConnection Server 是一个带宽测试软件
尘封086
博客等级 码龄18年 4粉丝 1原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值