Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted
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.
Posted

@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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...