automated telnet script
Posted on 2004-11-11
I am working on a project that has a deadline and unfortunately don't have much of a test environment. The app currently has the user telneting from his pc using boxed software to another box (type unknown) and running a script which will bring back a file. I am trying to create a script that will run a telnet script (using telnet because I have no way of knowing if the other machine supports ssh or anything else). The problem I have is that I don't have the 'expect' software on our unix box where I am doing my development and as it stands now, I will not be able to obtain this without an act of congress. Is there any way that I can create a telnet script and pass it the login and password (along with the ip) and have it login to the other machine and run the script that is currently being run and return the file that is created by that script? The reason I have to pass it a login & password and ip is that depending on the type of poll they are running for the telnet session, these values will be different (I have them set up in a database table so that it will know which login and password to use). Any help would be greatly appreciated because I am at a loss. Examples would be even more appreciated.