Mailing List Archive

How to use curl to run command in zebra?
Hi all,

I'm working on sonic, there is no telnet, so I can't login zebra's VTY.

So I run this command:

> curl -s --form "command=help" http://localhost:2601/


But it report "Bad password" error like this:

> Enter host password for user 'SONIC':
> Hello, this is Quagga (version 0.99.24.1).
> Copyright 1996-2005 Kunihiro Ishiguro, et al.
>
> User Access Verification
> ??????"??Password:
> Password:
> Password:
> % Bad passwords, too many failures!


How to use curl correctly for this command? Thank you.
Re: How to use curl to run command in zebra? [ In reply to ]
On Thu, Jun 28, 2018 at 12:00:02PM +0100, quagga-users-request@lists.quagga.net wrote:
> Message: 1
> Date: Thu, 28 Jun 2018 15:23:22 +0800
> From: Sam <batmanustc@gmail.com>
> To: quagga-users@lists.quagga.net
> Subject: [quagga-users 14990] How to use curl to run command in zebra?
> Message-ID:
> <CAOE=1Z1jk5uhc7G6YOuJAAS3o_KL09yJFCtFE--xaixUerMsmw@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi all,
>
> I'm working on sonic, there is no telnet, so I can't login zebra's VTY.
>
> So I run this command:
>
> > curl -s --form "command=help" http://localhost:2601/
>
>
> But it report "Bad password" error like this:

I don't know what "on sonic" means, but if you have access to the vtysh
command, you can try something like this for an interactive vty session:

vtysh -d ospfd

or for a single command something like this:

vtysh -d ospfd -c 'show ip ospf route'

Regards
Matthias
_______________________________________________
Quagga-users mailing list
Quagga-users@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-users