14 lines
325 B
Bash
Executable File
14 lines
325 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 docker ps --format '{{.Names}} {{.Ports}}' | grep -E 'agent|tsenyang'"
|
|
expect {
|
|
"*assword:*" {
|
|
send "0936223270\r"
|
|
exp_continue
|
|
}
|
|
eof
|
|
}
|