Newer
Older
cortex-hub / scripts / remote_exec.exp
#!/usr/bin/expect -f
set timeout 300
set password "a6163484a"
set user "axieyangb"
set host "192.168.68.113"
set cmd [lindex $argv 0]

spawn ssh -o StrictHostKeyChecking=no $user@$host "$cmd"
expect {
    "password:" {
        send "$password\r"
        exp_continue
    }
    eof
}