Remotely configuring Vyatta using Plink?


#1

Greetings all!

I am trying to use PLINK from a Windows OS to send remote update commands to a Vyatta Router and execute configuration changes.

I had seen a similar post on the old forums speaking to this on the Vyatta forum page but am unable to find it now that the site has migrated over to Brocade.

Any help is greatly appreciated.

When I do the following:

plink -ssh [username]@[serverIP] -pw [password]

I ssh into the router and have the ability to manually configure the router. Good but I want to do it remotely with a batch file.

So I next tried the command:

plink -ssh [username]@[serverIP] -pw [password] configure

I wanted to test to see if I could get to the configuration mode of the router. However, with this command and anything similar to it, I receive the error [INVALID COMMAND].

From what I remember seeing from the old vyatta.org forums, someone used some type of script in order to send and use configuration commands by using PLINK.

Does anyone know how to do this or perhaps what script they were using?

Any help would be greatly appreciated.

V/R,
Ken


#2

You may have a look at expect.

http://en.wikipedia.org/wiki/Expect