#!/usr/bin/expect -f set env(TERM) vt100 set force_conservative 1 if {$force_conservative} { set send_slow {1 .1} proc send {ignore arg} { sleep .1 exp_send -s -- $arg } } set timeout 10 match_max 100000 spawn telnet $argv 22 expect -exact "SSH-" send -- "quit\r" expect eof