NAME

tel - script for router logins

SYNOPSIS

tel gw1-my-device gw2-my-device ...

Options: -h help message -l logging -d debug mode -v version -p connection port -P override profile -m connection method -x run script file -c run commands -a auto commands -t sets the timeout -s sleep between commands -4 force IPv4 connection -6 force IPv6 connection

OPTIONS

-c

Runs a series of commands that are separated by semicolons.

Example: tel -c "show ver; sh run" gw1-my-device

-l

Enables logging to a file /tmp/gw1-my-device.log.

Example: tel -l gw1-my-device

-d

Enables debugging, which will warn you if some of the runtime modules fail to load.

Example: tel -d gw1-my-device

-x or --xscript

Runs a command-file file, which is a list of commands for the device. Can be specified multiple times to run multiple scripts.

If you need to use a newline in the script to get through a prompt then you can use \r. An example of this might be "reload\ry"

Example: tel -x changes.txt gw1-my-device

-a

Specify auto commands to run. This overrides any commands loaded from profiles and is used for all devices during the session.

Example: tel -a "sh run int vlan35; conf t" gw1-my-device

-p

Specify connection port. This overrides any specific port in loaded profiles and is used for all devices during the session.

Example: tel -p 22 gw1-my-devices

-P or --profile

Override the loaded profiles with another defined in telrc. This is useful if you're logging into the IP of a server rather than using the DNS name.

Example: tel -P zhone 10.9.9.9

-A

This overrides the profile after you've logged into the server. You might need this if you're logging into an out of band server made by one vendor to access the console of a device made by another vendor.

Example: tel -A zhone oob-test-lab:2004

-m

Specify connection method. This overrides specific methods in loaded profiles and is used for all devices during the session.

Example: tel -m ssh gw1-my-devices

-t

Specify timeout in seconds. The default is 90 seconds. This overrides specific methods in loaded profiles and is used for all devices during the session.

Example: tel -t 30 gw1-my-devices

-s

Specify timeout in seconds to sleep between commands. This only applies to commands specified for -x, -c or -a. This will use Time::HiRes if it's installed for sub-second sleep values like 0.5.

Example: tel -s 3 -x myfile.txt gw1-my-devices

-S

Specify timeout in seconds to sleep between commands. This applies to interactive sessions as well as login commands. This will use Time::HiRes if it's installed for sub-second sleep values like 0.5.

If both -S and -s are set, then -S overwrites the value of -s.

Example: tel -S 3 gw1-my-devices

-4 or -6

Force the connection to only use IPv4 or IPv6.

Example: tel -4 gw1-my-device

-v

Print the version information

Example: tel -v

SUBROUTINES

HELP_MESSAGE

Boilerplate routine for Getopt::Std

VERSION_MESSAGE

Boilerplate routine for Getopt::Std