11-23-2010
do you have to use expect/telnet? develop a simple socket program in Perl, Python or whatever langauge. nc is also a great utility to test something like this.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
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
3. Shell Programming and Scripting
This Expect script provides expect with a list of IP addresses to Cisco IPS sensors and commands to configure Cisco IPS sensors. The user, password, IP addresses, prompt regex, etc. have been anonymized. In general this script will log into the sensors and send commands successfully but there are... (1 Reply)
Discussion started by: genewolfe
1 Replies
4. Shell Programming and Scripting
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
5. Shell Programming and Scripting
I am writing perl script to configure Cisco device but Variables inside Net::Telnet::Cisco Module doesn't work and passed to device without resolving.
Please advise.
here is a sample of script:
use Net::Telnet::Cisco;
$device = "10.14.199.1";
($o1, $o2, $o3, $o4) = split(/\./,$device);... (5 Replies)
Discussion started by: ahmed_zaher
5 Replies
6. Shell Programming and Scripting
Hi all,
I use a bash script which use expect to connect throught ssh and run command on a cisco router. The ssh connection with expect work fine, but the first command on the cisco router failed,
I try to run the command in error by hand and it work fine... :(
the first part of the script... (2 Replies)
Discussion started by: bedomon
2 Replies
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
I know there are better ways to do this.
I prefer snmp. I do not have the proper perl modules loaded on the platorm. Snmp isnt loaded on the platform. Telnet is not an option. I need to write an expect script to pull cisco equipment configs.
The following code is executed once I gain... (0 Replies)
Discussion started by: popeye
0 Replies
9. Shell Programming and Scripting
HI all
i need to connect to about 900 cisco routers and switch to do some configs changes. the issue i am having is that half the devices have one set of username and password and the other half have another username and password. From expect or bash script i can ssh into a device and make... (0 Replies)
Discussion started by: quintin
0 Replies
LEARN ABOUT CENTOS
mconnect
mconnect(1) User Commands mconnect(1)
NAME
mconnect - connect to SMTP mail server socket
SYNOPSIS
mconnect [-p port] [-r] [hostname]
DESCRIPTION
The mconnect utility opens a connection to the mail server on a given host, so that it can be tested independently of all other mail soft-
ware. If no host is given, the connection is made to the local host. Servers expect to speak the Simple Mail Transfer Protocol (SMTP) on
this connection. Exit by typing the quit command. Typing EOF sends an end of file to the server. An interrupt closes the connection immedi-
ately and exits.
OPTIONS
The following options are supported:
-p port Specify the port number instead of the default SMTP port (number 25) as the next argument.
-r "Raw" mode: disable the default line buffering and input handling. This produces an effect similar to telnet(1) to port
number 25.
OPERANDS
The following operand is supported:
hostname The name of a given host.
USAGE
The mconnect command is IPv6-enabled. See ip6(7P).
FILES
/etc/mail/sendmail.hf help file for SMTP commands
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
telnet(1), sendmail(1M), attributes(5), ip6(7P)
Postel, Jonathan B., RFC 821, Simple Mail Transfer Protocol, Information Sciences Institute, University of Southern California, August
1982.
SunOS 5.10 9 Nov 1999 mconnect(1)