23 lines
459 B
Bash
Executable File
23 lines
459 B
Bash
Executable File
#!/usr/bin/expect -f
|
|
set timeout -1
|
|
set jump_host "wooo@192.168.0.110"
|
|
set target_host "ollama@192.168.0.188"
|
|
|
|
spawn ssh -J $jump_host $target_host "echo 0936223270 | sudo -S cat /etc/nginx/sites-available/agent.wooo.work.conf"
|
|
expect {
|
|
"*assword:*" {
|
|
send "0936223270\r"
|
|
exp_continue
|
|
}
|
|
eof
|
|
}
|
|
|
|
spawn ssh -J $jump_host $target_host "ls -la /etc/nginx/sites-enabled/"
|
|
expect {
|
|
"*assword:*" {
|
|
send "0936223270\r"
|
|
exp_continue
|
|
}
|
|
eof
|
|
}
|