plexer Posted November 2, 2006 Posted November 2, 2006 I know telent isn't the most secure protocol to be using but I have found a nifty telnet scripting tool available from: http://users.telenet.be/tontonzen/gg/TST10.zip I've just used it to update the firmware in 9 HP access points in around the same time it would take to do one via the web interface or cli manually. At the moment I just changed the ip address at the head of the file and re-ran the shortcut for each one but I'm sure a list of hosts and a bit more tweaking maybe with a dash of vbscript could automate it even more. The script I used for my HP Wap's is: IP ADDRESS OF WAP 23 WAIT "Username:" SEND "admin\m" WAIT "Password:" SEND "ADMIN PASSWORD\m" WAIT "#" SEND "copy tftp file\m" WAIT ":" SEND "1\m" WAIT "name:" SEND "hp420-2150.bin\m" WAIT "IP:" SEND "IP ADDRESS OF TFTP SERVER\m" WAIT "[n]:" SEND "n\m" WAIT "#" SEND "reset board\m" WAIT ":" SEND "y\m" Ben
Geoff Posted November 2, 2006 Posted November 2, 2006 A) Use SSH. Telnet is vunerable to lots of fun attacks. B) cat somecommands.txt | ssh user@somehost Works for me and my Linux boxes.
plexer Posted November 2, 2006 Author Posted November 2, 2006 Yes Geoff as I said I am aware of telnets problems. I'm looking for a scriptable commandline SSH client. Thanks, Ben
plexer Posted November 2, 2006 Author Posted November 2, 2006 I've now downloaded the SSHWindows install from http://sshwindows.sourceforge.net/download/ this gives me ssh via cygwin. The nice think about the scripted telent was that it would wait for a specified response before continuing I'm not sure if just echoing a load of commands to an ssh session is going to be as successful. Ben
Geoff Posted November 2, 2006 Posted November 2, 2006 Well, both my client and server devices are Linux servers. So they don't paticularly care if you stuff a bunch of command down to them all at once. They'll just buffer up the input until they can run the next command. If I do want to do something fancy I can use the rather flexible bash shell to do most things complicated.
plexer Posted November 3, 2006 Author Posted November 3, 2006 @Geoff: cat somecommands.txt | ssh user@somehost just gives Pseudo-terminal will not be allocated because stdin is not a terminal. Tried it ony a centos 4.4 box and also cygwin on windows. Ben
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now