06-13-2014 12:18 PM
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.
Solved! Go to Solution.
06-18-2014 11:38 PM
06-20-2014 06:52 AM - edited 06-21-2014 04:00 AM
This worked for me.
Create a text file with the following
//begin of text file - this line should not be in the file
set system host-name test1
//end of text file - this line should not be in the txt file.
then use plink
C:\Program Files (x86)\PuTTY>plink -ssh email@example.com -pw yourpassword < i:\t.txt
note my test text file ii in the root of drive i:
This worked with no issues.
06-25-2014 04:00 PM
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.
12-29-2014 03:24 PM
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
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
#zonecreate "fazil_test", "Test_HUSVM_3B";"Test_HUSVM_5B"
CMD: with or without -batch -v it does not work, i like to create alias and zones via this tool
C:\Windows\system32>plink firstname.lastname@example.org.X .X -batch -pw keywest1 -m C:\Users\fsaiyed\Desktop\munsanb01\testplink.txt