#!/bin/bash
des_pass=testtest
expect -c "
spawn scp target/aaa-0.0.1.war root@192.168.1.30:/home/GameUser/MagicvesselUserWeb/aaa-release.war
expect \"password:\"
send \"${des_pass}\r\"
expect eof
"
上传 html 文件
#! /usr/bin/expect
spawn scp -r /Users/GrandKai/gitee/vue-admin/dist root@192.168.100.11:/usr/local/nginx/html/
expect "*password:"
send "123456\n"
expect eof
网友评论