# Ruby telnet

**URL:** <https://www.ruby-forum.com/t/ruby-telnet/195398>\
**Category:** Ruby\
**Created:** [September 22, 2010, 5:07pm UTC](https://www.ruby-forum.com/t/ruby-telnet/195398 "2010-09-22T17:07:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![woow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7bcc69/32.png) [@woow](https://www.ruby-forum.com/u/woow)\
**Post date:** [September 22, 2010, 5:07pm UTC](https://www.ruby-forum.com/t/ruby-telnet/195398/1 "2010-09-22T17:07:53Z")

</div>

hi All,

I am trying to do below and I am stuck I would appreciate your help.

1. Telnet run script 1 (this should be run without time out)
2. Telnet and run script 2.
3. Telnet and stop script 1 upon successful completion of step 2.

currently with the code I got…

when I do step 1…since I do not specify the timeout it is just stuck  
or when I specify the time out it times out and never get to run the  
second step.

Please give me some ideas. I tried to run the 1 step script in  
background but then when the telnet session end and goes to the step 2 1  
script dies as telnet session has ended…

---

<div class="post-metadata">

**Author:** ![woow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7bcc69/32.png) [@woow](https://www.ruby-forum.com/u/woow)\
**Post date:** [September 23, 2010, 3:50pm UTC](https://www.ruby-forum.com/t/ruby-telnet/195398/2 "2010-09-23T15:50:28Z")

</div>

On 2010-09-22, Ruwan B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> when I do step 1…since I do not specify the timeout it is just stuck  
> or when I specify the time out it times out and never get to run the  
> second step.
> 
> Please give me some ideas. I tried to run the 1 step script in  
> background but then when the telnet session end and goes to the step 2 1  
> script dies as telnet session has ended…

Take a look at Net::Telnet

regards,
