http://www.unix.com – I have write a script which contains Code: ssh -p 12345 dcplatform@10.125.42.50 ssh 127.0.0.1 -p 5555 "$CMD" ssh root@$GUEST_IP "$CMD" before I use public key, it works well, now I want to change to "expect", BUT I don't want to change above code and "parameter position" I can post a expect template can some one help me to modify it Code: #cat sshx #!/usr/bin/expect set timeout 60 set host [lindex $argv 0] set name root set password root spawn ssh $host -l $name expect { "(yes/no)?" { (HowTos)