spawn 启动新的进程
expect 从进程接收字符串
send 向进程发送字符串
interact 允许用户交互
远程登录linux系统
#!/usr/bin/expect
set timeout 30
spawn ssh -l root 192.168.130.195
expect "(yes/no)?"
send "yes\r"
expect "password:"
send "123456\r"
interact
spawn 启动新的进程
expect 从进程接收字符串
send 向进程发送字符串
interact 允许用户交互
远程登录linux系统
#!/usr/bin/expect
set timeout 30
spawn ssh -l root 192.168.130.195
expect "(yes/no)?"
send "yes\r"
expect "password:"
send "123456\r"
interact
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M