Virtual Router/ Firewall/ VPN

Reply
Highlighted
New Contributor
Posts: 2
Registered: ‎06-13-2014
Accepted Solution

Remotely configuring Vyatta Router using PLINK?

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

Brocadian
Posts: 95
Registered: ‎01-13-2009

Re: Remotely configuring Vyatta Router using PLINK?

Hi Ken,

I am sorry but I am not familiar with the script you may have seen. However, I wanted to drop you a note that I'm trying to get access to the old site but it will take me some time.

Best Regards,
Martin
Frequent Contributor
Posts: 144
Registered: ‎11-07-2013

Re: Remotely configuring Vyatta Router using PLINK?

[ Edited ]

Hi,

  This worked for me.

 

Create a text file with the following

 

//begin of text file - this line should not be in the file

conf
set system host-name test1
commit
exit
exit

//end of text file - this line should not be in the txt file.

 

then use plink

 

C:\Program Files (x86)\PuTTY>plink -ssh vyatta@192.168.1.2 -pw yourpassword < i:\t.txt

 

note my test text file ii in the root of drive i: 

 

 

This worked with no issues.

 

Thanks

Michael.

 

 

Thanks
Michael
New Contributor
Posts: 2
Registered: ‎06-13-2014

Re: Remotely configuring Vyatta Router using PLINK?

Thank you.  That worked.  I had no problems with it.  I had moved on to try using Expect instead of PLINK but I will likely return to my original model and use PLINK.

 

Thanks again.

 

V/R,

Ken

Frequent Contributor
Posts: 144
Registered: ‎11-07-2013

Re: Remotely configuring Vyatta Router using PLINK?

You are welcome Ken.

Thanks
Michael
Contributor
Posts: 22
Registered: ‎01-02-2014

Re: Remotely configuring Vyatta Router using PLINK?

I tried usin plink to automate the cmd for FC switch for brocade with FOS 6.3+

I can log in and use all the cmd like zoneshow, alishow but

when i tried to create a alias and or zone i got errors, but the same cmd is valid and working directly on the switch, are there any hidden carectors/issues.



error: Usage: zonecreate "arg1", "arg2"
No device found
error: Usage: alicreate "arg1", "arg2"

 

Here is my sample  txt file file

zoneshow
zonecreate
nodefind 50:06:0e:80:13:75:5c:88--works up till here
alicreate "Test_HUSVM_3B" , "50:06:0e:80:13:75:5c:88" --from here on i get error above
#alicreate "Test_HUSVM_5B","50:06:0e:80:13:75:5c:90"
#zonecreate "fazil_test", "Test_HUSVM_3B";"Test_HUSVM_5B"
#zoneshow *fazil_test*

 

CMD: with or without -batch -v it does not work, i like to create alias and zones via this tool 

C:\Windows\system32>plink userid@192.168.X .X  -batch  -pw keywest1 -m C:\Users\fsaiyed\Desktop\munsanb01\testplink.txt

Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.