I have a text menu running on a remote Linux host. I use ssh wait on this host and would like to figure out how to interact with the menu. Interaction includes an up, down arrow, and use of the arrow keys to enter and back. For instance,
Disconnect
Data Collection >
Utilities >
Save Changes
When you log in, Disconnect stands out. Thus, simply by tapping twice, you can disconnect from the system. The second entry confirms the disconnection.
The following code will be ssh on my system and will bring up a menu. If I delete the wait and try to send "\ r", thinking that it will select the "Disable" option, I get the following error: "write () did not write anything - it will sleep (1) and repeat ..."
set env(TERM) vt100
set password abc123
set ipaddr 162.116.11.100
set timeout -1
match_max -d 100000
spawn ssh root@$ipaddr
exp_internal 1
expect "*password:*"
send -- "$password\r"
expect "Last login: *\r"
expect eof
virterm term_expect, , . - , . , , , , .
,
-reagan