Sponsored Content
Full Discussion: Perl telnet
Top Forums Programming Perl telnet Post 302851995 by jim mcnamara on Tuesday 10th of September 2013 08:52:06 AM
Old 09-10-2013
The code is correct it's a perldoc example. Make sure the $host variable is assigned correctly.

In windows, try this :Get into cmd

try using the default port
Code:
telnet  hostname 23

See if you can connect. And then login. If you fail, find out what port you should use. Some flavors of telnet require ports like 992 for example, not the default 23.

After it works manually, transfer that information into your code. The perldoc article shows how to set port and other options.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl script for telnet

Is it possible to write a Perl script that will attempt to telnet to multiple servers and login to each one? We have numerous servers and on occasion we are unable to connect. I'd like to be more proactive and have a script that runs every 30 minutes and attempts to login and then will send an... (2 Replies)
Discussion started by: ssmiths001
2 Replies

2. Shell Programming and Scripting

Perl telnet to cisco router and compare the ping ms

All Please help, i will telnet to router to obain the ping status and compare, if higher than normal latency, i will have further action.. if i do the telent and in perl script then .... e.g the result i obtain from the router will be =' Success rate is 100 percent (5/5), round-trip... (4 Replies)
Discussion started by: optimus
4 Replies

3. Shell Programming and Scripting

Webpage to Telnet via Perl and Expect: Telnet problem?

Somewhat long story: I have a simple Perl CGI script that uses Expect to Telnet to a device and grab some data, and then spits it back to Perl for display on the Webpage. This works for many devices I've tried, but one device just fails, it keeps rejecting the password on this device, only... (1 Reply)
Discussion started by: jondo
1 Replies

4. AIX

Automation from Windows to Linux - Telnet and su using perl

Here is my requirement to automate the deployment procedure for my project. Telnet to AIX box (say SERVER1) from windows machine (with USER1) Select the server to login say "SERVER2" su as different user say "USER2"(Owner of the deployed files) Execute the script (Script has so many... (1 Reply)
Discussion started by: nurainos
1 Replies

5. Shell Programming and Scripting

Need Help on Telnet using PERL Scripting

Iam trying to connect to a system through Telnet using net::Telnet Module #!/usr/bin/perl -w use net::Telnet $myPassword = "abcdef"; $telnet = new Net::Telnet ( Timeout=>10, Errmode=>'die'); $telnet->open (10.10.20.00); $telnet->waitfor ('/USERCODE: $/i'); $telnet->print('abc');... (2 Replies)
Discussion started by: sudhakaryadav
2 Replies

6. Shell Programming and Scripting

Using Net::Telnet in Perl to connect to an adsl modem

Hello, First of all, congratulations on this forum! Very mice material! This is my fist thread and it has to do with connecting to an adsl modem and executing some commands. Heres what I do: $username = 'admin'; $passwd = 'admin'; $telnet = new Net::Telnet ( Timeout=>10,... (2 Replies)
Discussion started by: Ravendark
2 Replies

7. Shell Programming and Scripting

silent telnet and ssh using perl

Hi Experts, I use perl telnet and ssh for normal tasks and health checks. everything works fine but i would like to run scripts silently and print only data as i wish to. by silent i mean.no banners /no prompts/ nothing. I will format data before i print it on screen. just formatted... (3 Replies)
Discussion started by: mtomar
3 Replies

8. Shell Programming and Scripting

perl telnet issue with cisco

Hi Experts, I am using perl to telnet on cisco boxes. We have this stupid cisco node which does not support "terminal Length0" command. Since I am using Net::Telnet and capturing output with @output = $telnet->cmd('cmd'); Say @output = $telnet->cmd('show version'); Now problem... (2 Replies)
Discussion started by: mtomar
2 Replies

9. Shell Programming and Scripting

Need help on Perl telnet Script

Hi... Iam running the following Perl Script for telnet and running the commands.The script is exited without any errors.But the telnet commands are not executed,Please help me to resolve my problem. My telnet session #telnet 9.121.61.2 2013 Trying 9.121.61.2... Connected to... (1 Reply)
Discussion started by: raja_blr
1 Replies

10. Shell Programming and Scripting

Perl Telnet cisco routers

Hi all i have little problem finding solution about simple telnet script .... i have 250 routers and on some i have different password and on some they ask just for password no username. So for example 1,2,3 have username and password (user,password) 4, and 5 have different username and password... (0 Replies)
Discussion started by: IvanMP
0 Replies
fence_drac(8)						      System Manager's Manual						     fence_drac(8)

NAME
fence_drac - fencing agent for Dell Remote Access Card SYNOPSIS
fence_drac [OPTION]... DESCRIPTION
fence_drac is an I/O Fencing agent which can be used with the Dell Remote Access Card (DRAC). This card provides remote access to control- ling power to a server. It logs into the DRAC through the telnet interface of the card. By default, the telnet interface is not enabled. To enable the interface, you will need to use the racadm command in the racser-devel rpm available from Dell. To enable telnet on the DRAC: [root]# racadm config -g cfgSerial -o cfgSerialTelnetEnable 1 [root]# racadm racreset fence_drac accepts options on the command line as well as from stdin. Fenced sends parameters through stdin when it execs the agent. fence_drac can be run by itself with command line options. This is useful for testing and for turning outlets on or off from scripts. Vendor URL: http://www.dell.com OPTIONS
-a IPaddress IP address or hostname of the switch. -c cmd_prompt Force fence_drac to use cmd_prompt as the command prompt -d dracversion Force fence_drac to treat the device as though it was for the specified drac version -D dumpfile Debug file of the telnet interaction -h Print out a help message describing available options, then exit. -l login Login name. -m modulename The module name of the blade when using DRAC/MC firmware. -o action The action required. reboot (default), off, on or status. -p password Password for login. -S path Full path to an executable to generate the password for login. -f seconds Wait X seconds before fencing is started -V Print out a version message, then exit. STDIN PARAMETERS
action = < param > The action required. reboot (default), off, on or status. agent = < param > This option is used by fence_node(8) and is ignored by fence_apc. cmd_prompt = < param > Force fence_drac to use cmd_prompt as the command prompt drac_version = < param > Force fence_drac to treat the device as though it was for the specified drac version. debug = < dumpfile > Debug file of the telnet interaction ipaddr = < hostname | ip > IP address or hostname of the switch. login = < param > Login name. modulename = < param > The module name of the blade when using DRAC/MC firmware. passwd = < param > Password for login. passwd_script = < param > Full path to an executable to generate the password for login. delay = < param > Wait X seconds before fencing is started SEE ALSO fence(8), fence_node(8) fence_drac(8)
All times are GMT -4. The time now is 02:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy