Shell script to telnet and run commands
Solved/Closed
Related:
- Telnet script
- Telnet shell - Best answers
- Telnet script linux - Best answers
- Disable java script tor - Guide
- Ubuntu startup script - Guide
- Windows startup script - Guide
- Run shell script ✓ - Linux/Unix Forum
- Savefrom net helper script - Download - Video downloads
3 responses
netgear5
Posts
8
Registration date
Saturday 4 October 2008
Status
Member
Last seen
27 April 2009
29
12 Nov 2008 à 05:58
12 Nov 2008 à 05:58
hey buddy this is a great thing that you have posted here. thks for the help and hope that will here very somme with some useful tips like that.
15 May 2009 à 04:24
spawn telnet <machine ip>
expect "login:"
send "<username>\n"
expect "Password:"
send "<password>\n"
send "bash\n"
send "cd /opt\n"
send "ls -ltr\n" (if you are not giving \n then it will wait for your response or u have to type enter manually).
interact
How to execute the “expect“ command expect –f <file name>
Ex: expect –f <filename>.expect