vrtualrealty
vrtualrealty

Reputation: 23

How to automate interactive telnet commands?

I would like to query a telnet server on port 105. What I have to do currently is start an interactive session and enter the commands later one by one.

Since I already know the commands, I would like to automate this process and fetch the results without any manual intervention.

When I try to use pipe to push commands at the time of logging in, this doesn't work. Any help is highly appreciated.

Upvotes: 2

Views: 6632

Answers (2)

Qben
Qben

Reputation: 2623

Since you do not say what OS you use, and what kind of script language you want to use I will just provide a few suggestions for further reading.

this questions might answer what you are looking for.

Also I found this that could help you out a bit.

Upvotes: 0

Christopher Creutzig
Christopher Creutzig

Reputation: 8774

You are probably looking for a tool like expect.

Upvotes: 1

Related Questions