473,385 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Query in Net::Telnet Module

Hi all,

This is the code I use to login to any device.( I will not be able to see any window but it will be able to login to the device and give the command specified)... can you tell me what changes I should do so that I can see what happens ...(like telnetting to the device ) Hope you can get my question

Expand|Select|Wrap|Line Numbers
  1. $telnet3 = new Net::Telnet(
  2.     Timeout    => 10,
  3.     Errmode    => 'die',
  4. );
  5. $telnet3->open('192.168.134.36'); # Substituted fake IP
  6. $telnet3->waitfor('/Enter login: $/i');
  7. $telnet3->print('user'); # Substituted fake User
  8. $telnet3->waitfor('/Enter password: $/i');
  9. $telnet3->print('pass'); # Substituted fake PW
  10. $telnet3->waitfor('/> $/i');
  11. print "Logged in to device\n";
  12. telnet3->print("reboot");
  13.  
May 22 '07 #1
1 1614
miller
1,089 Expert 1GB
Hi kriz,

Sorry, but I've never used Net::Telnet, so I don't advise you in this. I can only point you to the documentation in hope that they specify something:

cpan Net::Telnet

However, I will point out that it is generally not a good idea to include the IP, login, and password to your device in a public forum post. I've editted out that information from your post, but just wanted to make sure that you avoided doing that in the future.

- Miller
May 22 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Pete Johansen | last post by:
Hi Folks, This prompt statement has been a real pain in the the butt. I am using net::telnet(v3.03) to connect to a W2K box from a Solaris 2.6 box. I the output stream resulting from a 'dir'...
2
by: Vinay Gupta | last post by:
Hi, In a Perl to Tcl conversion project, I am planning to use the following Tcl extensions as a replacement for some Perl libraries. My development environment is Windows. Win32::OLE --> "DDE"...
1
by: jyohere | last post by:
I want to login to a remote machine using Net::Telnet....then i want to move to a particular directory in that remote machine....after that i want to get a list of files under that directory....after...
0
by: shineyang | last post by:
Dear all: Who is kind to help me about the following problem. Why cannot log the remote node by using Net::Telent #################################### The following is normal to the process...
3
by: surajsingh | last post by:
Hi, I have a perl script which uses Net::Telnet module to open a telnet session with my unix boxes, and executes lot of commands on those boxes. As this module is implemented, when 'cmd' is...
2
by: kriz4321 | last post by:
Hello all i am using net:telnet module to login to the remote machine and execute some commands and to collect some logs corresponding to the command given. After loging into the machine I do...
2
by: jane007 | last post by:
Hi everybody, Anybody who know how to use Net::Telnet module to execute my own script?Not only to execute system command. Please advise. Thanks.
21
by: poolboi | last post by:
hi guys, a question on net::telnet what does this module do? cos i have a telnet client that will be able to communicate with a database so is it true if i enter my ip address, username, and...
0
by: SteveBark | last post by:
Any pointers on this truly appreciated. I am using net::telnet to connect to a modem pool and then connect with a remote piece of kit. Everything works fine normally, however on occassions the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.