01-18-2009
Terminal scripting to automate login to cisco devices. Help Please !
Hello,
I am new to the mac world, and would like to automate my login to cisco devices (routers, switches etc...), i am in a need of writing a script that i may just click on an icon on the desktop and it will open terminal and run a few command.
as follow:
telnet to an ip address
type the username and password
log all screen output to a file.
Currently i am using the expect and send command but cannot get the script to work as one piece.
any help in the matter would be appreciated.
here is what i got:
telnet x.x.x.x.x
expect -re "Username:"
send "Admin\r"
expect -re "ass:"
send "XXX\r"
Thanks,
Rasta.
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I use configure cisco devices daily using hyper terminal in windows via the serial port. Is there an alternative solution in unix that I can connect to a cisco console port via serial port? What application do I need?? (1 Reply)
Discussion started by: dgroove3
1 Replies
2. Shell Programming and Scripting
I'm trying to write a login script to ssh into a cisco switch that will run some command remotely. Similar to this expect script located here:
SSH login expect shell script to supply username and password
However, that script does not work with cisco ios. Anyway know what the best way to... (1 Reply)
Discussion started by: streetfighter2
1 Replies
3. Shell Programming and Scripting
Hi,
Can anyone pls help me to automate login to cvs. I basically want to login to cvs and update a file.
the script always gets to the login and returns the prompt for a password.
Is there any way to send the password in the script itself.
Here is the script:
#!/bin/ksh... (0 Replies)
Discussion started by: raghu_shekar
0 Replies
4. Shell Programming and Scripting
Hi All,
I need information regarding how to automate the pbrun process in script in Linux.
Example sample script below,
#!bin/sh
/usr/xyz/pbrun testusr -password testpwd
testusr is username for pbrun and testpwd is password for pbrun.
Im not sure if it is correct way to invoke pbrun in... (2 Replies)
Discussion started by: Pravs4info
2 Replies
5. Shell Programming and Scripting
Greetings, guys. I'm not much of a programmer forgive me for being a noob, because of someone leaving, I was put in an IT spot where I have to figure out a few things. Being new to Linux and programming has been a challenge.
My boss has asked me to create an automated script to connect to a 3rd... (7 Replies)
Discussion started by: giovannym
7 Replies
6. Linux
Hi,
My name is SAMKZ and I'm a dummy with Linux and I'm so sad about that.
I need to have a Syslog Server to archive Logs from my Cisco Routers and Switches.
I'd like to know to most robust way of doing this.
I've installed Centos 5.9 and Trixbox both on VMWares.
I've read... (1 Reply)
Discussion started by: SAMKZ
1 Replies
7. Shell Programming and Scripting
i have to connect windows server from one of the unix box so i am using telnet and below is my following code
#!/bin/sh
host=hostname
log=loginid
port=23
pass=password
cmd1=mkdir test1234
( echo open ${host} ${port}
sleep 1
echo ${log}
sleep 3
echo "\r\n"
sleep 3
echo ${pass}... (11 Replies)
Discussion started by: chandan.p
11 Replies
8. Shell Programming and Scripting
Hello everyone.
I'm a Linux novice trying out a lot of bash scripting lately, as it is so very addictive.
Lately I have been setting up one of my boxes remotely and have been hardening it as much as possible. Please allow me to explain the scenario, as it does tend to become a little... (1 Reply)
Discussion started by: instro
1 Replies
LEARN ABOUT DEBIAN
exim_convert4r4
EXIM_CONVERT4R4(8) System Manager's Manual EXIM_CONVERT4R4(8)
NAME
exim_convert4r4 - Convert Exim configuration from v3 to v4 format
SYNOPSIS
exim_convert4r4
DESCRIPTION
This script is provided to assist in updating Exim configuration files. It reads an Exim 3 configuration file on the standard input, and
writes a modified file on the standard output. It also writes comments about what it has done to the standard error file. It assumes that
the input is a valid Exim 3 configuration file. A typical call to the conversion script might be
exim_convert4r4 < /etc/exim/exim.conf > /etc/exim4/exim4.conf.new
The output file MUST be checked and tested before trying to use it on a live system. The conversion script is just an aid which does a lot
of the "grunt work". It does not guarantee to produce an Exim 4 configuration that behaves exactly the same as the Exim 3 configuration it
reads.
Each option change in the new file is preceded by an identifying comment. In fact, the conversion script tends to make quite a mess of
your configuration, and you should expect to go through it afterwards and tidy it up by hand.
Unless you are running a very straightforward configuration, the automatic conversion is likely to generate a non-optimal configuration.
You should not only check it thoroughly, but also run as many tests as you can, to ensure that it is working as you expect. In particular,
you should test address routing, using -bt and -bv, and the policy controls, using -bh. If possible, you should also do some live tests
(i.e. send and receive some messages) before putting Exim 4 into service.
If you have a very complicated configuration, it is possible that exim_convert4r4 will break it in some situations, which is why thorough
testing is strongly recommended.
BUGS
This manual page needs a major re-work. If somebody knows better groff than us and has more experience in writing manual pages, any patches
would be greatly appreciated.
SEE ALSO
exim(8), the files in /usr/share/doc/exim4-base/, especially Exim4.upgrade.gz
AUTHOR
This manual page was stitched together from Exim4.upgrade by Andreas Metzler <ametzler at downhill.at.eu.org>, for the Debian GNU/Linux
system (but may be used by others).
March 26, 2003 EXIM_CONVERT4R4(8)