DrayTek UK Users' Community Forum

Help, Advice and Solutions from DrayTek Users

Configure an IP Object via code/script

  • philhemel
  • Topic Author
  • User
  • User
More
04 Mar 2018 10:00 #1 by philhemel
Configure an IP Object via code/script was created by philhemel
I'm trying to configure an IP object via code/script. It works using Telnet and SendKeys commands but that's a really naff solution, and I particularly don't want a visible window popping up

It works via SSH in Putty, it's commandline program Plink, Bitvise, and it's commandline program stermc if I let them launch a terminal then MANUALLY enter:
object ip obj 1 -a 1 192.168.1.2
into the terminal window, but NOT unattended e.g.

plink -ssh 192.168.1.1 -l admin -pw password object ip obj 1 -a 1 192.168.1.2
fails with:
"FATAL ERROR: Server refused to start a shell/command"

stermc -profile=C:\draytek.tlp object ip obj 1 -a 1 192.168.1.2
fails with:
"Warning: Terminal channel closed. Execute request failed."

Any ideas what I'm doing wrong? Or if there's a better solution I haven't thought of?

Many thanks

Please Log in or Create an account to join the conversation.

  • hornbyp
  • User
  • User
More
04 Mar 2018 13:24 #2 by hornbyp
Replied by hornbyp on topic Re: Configure an IP Object via code/script
I found a clue on a web site somewhere, that points out that you can't get a "Shell" as such on the Vigor, only a proprietary Draytek command line interface (which isn't the same thing). This would explain the error message.

Please Log in or Create an account to join the conversation.

  • philhemel
  • Topic Author
  • User
  • User
More
04 Mar 2018 13:32 #3 by philhemel
Replied by philhemel on topic Re: Configure an IP Object via code/script
Thanks for replying, yeah it's looking that way :(

Please Log in or Create an account to join the conversation.