Tcl Expect with Putty telnet

Posted by fenrisian on 2017-09-12 01:59
Forums: Expect discussion | OS: Windows 10


Trying to achieve a goal of running putty's plink -telnet via Tcl Expect.

When i do a regular:
plink -telnet %ip%

i get an output of the process and am able to properly conduct what i have planned.

But when i try the same from Tcl Expect:
% package require Expect
% exp_internal 1
% spawn plink -telnet %ip% -s
% expect -nocase login

expect: does "" (spawn_id exp4) match glob pattern "login"? no
expect: timed out

there is simply no response from the piped process.

Tcl: 8.6(x86)
Expect: 5.43.2
Putty: latest x86
Win10 x64

ActiveState Staff
Tue, 2017-09-12 08:20

Expect (on Windows) is known to be incompatible with Windows 8 and higher.

Stick to Windows 7 where the plink work-around still works for 64-bit, or switch to using Linux as the local system.

fenrisian | Thu, 2017-09-14 06:01

Have been successfully using ActiveTCL with Expect on Win10, so the incompatibility stage is passed, and this occurs only when i try to use plink.