If I type something like this at the command line it works fine. If I connect via SSH and do the same thing it works fine. But if I try and automate this process by piping it to an SSH session:
I use semi-colons between commands, at least for short things. I don’t run but a few lines on my stuff. Try using { } around your file and see if that helps.
Thanks for the suggestion, but braces don’t seem to help. I get a ‘missing closing brace’ error in addition to the ‘bad command name’ errors if I put braces round it.
Thanks for clarifying. Is there a good way of applying a batch of commands like this, other than FlashFig? I’ll probably use FlashFig for bulk configuration of routers in a live setup, but for the moment I just want a quick way of applying a batch of commands from the command-line while I’m developing.
The best way I’ve found is to copy the file across with SCP and execute it on the router, which seems to work fine.