Scenario:
1. Logged into a host UNIX (System A).
2. Telneting to a switch (1.2.3.4) that requires a
login/password for access. (telnet is the only method
allowed to enter switch)
3. Running a display command (e.g.: display 123/S 23/A 14)
to capture data back to a file on host UNIX (System A).
Trying to use a here document on System A as follows:
#####################################################
get-switch-data.sh
telnet 1.2.3.4 <<-EOF 2>&1 > /home/switch/sw-data/log-data
guest
guest
display 123/S 23/A 14
EOF
#####################################################
Trouble I'm running into, is with the login/password
required. How can I pass it(login/password) to telnet (I know about the -l login) option on command line telnet -l guest, but no password option), and get my log-data from the command being passed.
Anny help, Thanks!
FGG123
1. Logged into a host UNIX (System A).
2. Telneting to a switch (1.2.3.4) that requires a
login/password for access. (telnet is the only method
allowed to enter switch)
3. Running a display command (e.g.: display 123/S 23/A 14)
to capture data back to a file on host UNIX (System A).
Trying to use a here document on System A as follows:
#####################################################
get-switch-data.sh
telnet 1.2.3.4 <<-EOF 2>&1 > /home/switch/sw-data/log-data
guest
guest
display 123/S 23/A 14
EOF
#####################################################
Trouble I'm running into, is with the login/password
required. How can I pass it(login/password) to telnet (I know about the -l login) option on command line telnet -l guest, but no password option), and get my log-data from the command being passed.
Anny help, Thanks!
FGG123