- have to change file mod
chmod 755 exp-file
- simple example
#!/usr/bin/expect set timeout -1 set target_host [lindex $argv 0] set password [lindex $argv 1] spawn bash -c "ssh $target_host" expect { "password: " { send "$password\r" } } interact

Seonglae Cho
Seonglae Chochmod 755 exp-file
#!/usr/bin/expect set timeout -1 set target_host [lindex $argv 0] set password [lindex $argv 1] spawn bash -c "ssh $target_host" expect { "password: " { send "$password\r" } } interact