Tcl Expect with Putty telnet

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

Hello.

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
5.43.2
% exp_internal 1
% spawn plink -telnet %ip% -s
16196
% 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

grahams
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.