zl程序教程

您现在的位置是:首页 >  系统

当前栏目

Linux系统shell脚本之Expect实现SSH免交互执行命令

Linuxssh系统shell 实现 脚本 交互 执行命令
2023-09-14 09:09:22 时间

Linux系统shell脚本之Expect实现SSH免交互执行命令

一、Expect介绍

Expect是一个自动交互式应用程序的工具,如telnet,ftp,passwd等。

二、安装expect软件包

yum -y install expect

三、编写expect脚本

root@192 scripts]# cat expect_ssh.sh 
#!/bin/bash
########################################