(DblQuotTkn & Plink) Tcl script using plink to send configuration commands to Cisco router
To send configuration commands to a Cisco router using plink and the tclsh, first enable shell processing on the router with the "shell process full" configuration command. Then save the desired configuration commands to a file in flash using
plink -ssh -pw <password> <username>@<router-ip> echo "ios_config \"hostname bob\" > <file>"
Then send another plink command to run your command file from tclsh:
plink -ssh -pw <password> <username>@<router-ip> tclsh <file>
After that, clean up with
plink -ssh -pw <password <username>@<router-ip>del /force <file>
plink -ssh -pw <password> <username>@<router-ip> echo "ios_config \"hostname bob\" > <file>"
Then send another plink command to run your command file from tclsh:
plink -ssh -pw <password> <username>@<router-ip> tclsh <file>
After that, clean up with
plink -ssh -pw <password <username>@<router-ip>del /force <file>
Comments
because i wish for enjoyment, since this this site conations genuinely
good funny information too.