Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#!/usr/bin/tclsh
package require Expect
set host1 "host1"
set host2 "host2"
set prompt ".*@.*"
set timeout 20
#exp_internal 1
log_user 0
spawn -noecho ssh $host1
expect {
-re ".*asswo.*" {
send_user "At spawn id = $spawn_id: $expect_out(buffer) "
stty -echo
set password [gets stdin]
send "$password\r\n"
stty echo
expect -re $prompt {
send "\nssh $host2\r\n"
interact
}
}
eof {send_user "\nConnection abnormally closed\n"}
timeout {send_user "\nConnection timeout\n"}
}
ssh firsthop.hostname "ssh secondhop.hostname \"$@\""