码迷,mamicode.com
首页 >  
搜索关键字:linux系统批量修改密码 expect ssh免交互    ( 1280个结果
自动交互脚本之expect
一、Expect简介在远程服务器执行某项任务,这是最正常不过了,如何有效自动的执行呢?这里介绍自动交互脚本expect的使用。Expect是一个简单的工具语言,功能就是进行自动化的人机交互。它的作者对Expect的定义:是一个实现自动交互功能的软件套件(asoftwaresuiteforautomating..
分类:其他好文   时间:2016-01-12 19:44:39    阅读次数:156
expect用法
a) spawn: spawn命令是Expect的初始命令,它用于启动一个进程,之后所有expect操作都在这个进程中进行,如果没有spawn语句,整个expect就无法再进行下去了,使用方法就像下面这样: spawnssh root@192.168.0.1在spawn命令后面,直接加上要启动的进程...
分类:其他好文   时间:2015-12-29 19:08:50    阅读次数:267
批量操作SSH账户信任
#!/bin/bashauto_ssh_key(){expect-c"settimeout-1;spawnssh-copy-id-i$path/.ssh/id_rsa$1;expect{*yes/no*{send--yes\rexpect*assword*send--$2\r;expect{*denied*{exit2;}eof}}*assword*{send--$2\r;expect{*denied*{exit2;}eof}}eof}"}echo‘--------------------Directions..
分类:其他好文   时间:2015-12-12 08:23:26    阅读次数:174
expect
http://blog.csdn.net/tantexian/article/details/45887857http://stackoverflow.com/questions/19403360/how-to-use-expect-to-copy-a-public-key-to-a-hostUnd...
分类:其他好文   时间:2015-12-10 13:26:10    阅读次数:350
expect实现交互式输入
一.用expect实现交互式输入#!/usr/bin/expect-fsetLUKS_passphrasexxxx123setVerify_passphrasexxxx123spawncryptsetupluksFormat/dev/vdb1expect"Areyousure?(Typeuppercaseyes):"settimeout5send"YES\r"expect"EnterLUKSpassphrase:"settimeout5send"$LUKS_passphrase\r"expe..
分类:其他好文   时间:2015-12-09 19:52:29    阅读次数:206
expect交互式自动化脚本
一 什么是expect 1 Expect is a tool for automating interactive applications such as telnet, ftp, 2 passwd, fsck, rlogin, tip, etc. Expect really make...
分类:其他好文   时间:2015-12-06 19:14:06    阅读次数:333
Linux expect
Linux expect 使用简介一.登陆到远程主机脚本代码如下:###############################################!/usr/bin/expectset timeout 30spawn ssh -l username hostipexpect { "y...
分类:系统相关   时间:2015-12-04 12:24:24    阅读次数:145
expect shell python   glpi exception.mac
huawei用expect来获取AC里面WLAN的MAC地址名单,运行脚本,信息会输出到屏幕1get.switch.wlan.grep.mac.sh用正则表达式过滤MAC地址,保存纯MAC到文件中2.exception.py用来把从AC获取的MAC与GLPI的MAC进行比较,把不在GLPI里面的MAC输出到文件安装Python-mysql库 [root@pc000311..
分类:编程语言   时间:2015-11-24 18:48:47    阅读次数:293
summit交易的expect flow不能从pending状态更新到SAPR状态
【问题描述】交易的expect flow不能从pending状态更新到SAPR状态,可能是pre-settlement server的问题。【解决方法】该问题是因为目前系统内堆积了比较多的待处理的消息,约40万的样子, 且系统环境比较慢, 所以新录入的交易的EXPFLOW无法正常编程SAPR, 通过...
分类:其他好文   时间:2015-11-24 12:32:04    阅读次数:129
python expect交互
[root@pc0003glpi_switch_ocs]#catssh3.py #!/usr/bin/envpython #-*-coding:utf-8-*- importpexpect importgetpass,os defssh_command(user,host,password,command): ssh_newkey=‘Areyousureyouwanttocontinueconnecting‘ child=pexpect.spawn(‘ssh-l%s%s%s‘%(user,host,com..
分类:编程语言   时间:2015-11-23 19:27:02    阅读次数:229
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!