Mailing List Archive

Re: [zebra 20411] vtysh
Mike,
I don't think you can do that unfortunately. If vtysh is enabled, the only way to control the protocol daemons is through vtysh. If you would like to use ssh or telnet, you must compile it without vtysh. I was wondering why you would want to pass commands to vtysh through ssh/telnet?

Best regards,
Damien

mikeliu <mikeliu@netrd.iii.org.tw> wrote:
All,

As far as I know, a hack would be setting up a user that can login per SSH and has vtysh as shell in /etc/passwd. I am wondering how sshd or telnetd passes commands to vtysh since I would like to write a program like what sshd or telnetd does.

Thank you so much!!


Mike
_______________________________________________
Zebra mailing list
Zebra@ml.zebra.org
http://ml.zebra.org/mailman/listinfo/zebra
Re: [zebra 20411] vtysh [ In reply to ]
On Friday, September 05, 2003 8:50 AM, mikeliu <mikeliu@netrd.iii.org.tw>
wrote:
>> All,
>>
>> As far as I know, a hack would be setting up a user that can login per
SSH
>> and has vtysh as shell in /etc/passwd. I am wondering how sshd or telnetd
>> passes commands to vtysh since I would like to write a program like what
>> sshd or telnetd does.
>>

That works the same way as your sshd passes commands to sh or bash or
whatever. Nothing special. I've not yet done this with zebra/quagga but with
ZebOS which also comes with a vtysh. That's how the password entry looks
like

zebos:x:106:102:ZebOS VTYSH admin account:/home/zebos:/usr/local/sbin/vtysh



Arnold
Re: [zebra 20411] vtysh [ In reply to ]
On Friday, September 05, 2003 10:45 AM, mikeliu <mikeliu@netrd.iii.org.tw>
wrote:
>> That works the same way as your sshd passes commands to sh or bash or
>> whatever. Nothing special.
>
> I see. But, how to write a program to pass commands to sh or bash or vtysh
> instead of sshd?
>

No need to re-invent the wheel. Use rancid which is a powefull tool to
manage network elements and also has a program to pass commands via telnet
or ssh. Rancid lives at http://www.shrubbery.net/rancid/


Arnold
Re: [zebra 20411] vtysh [ In reply to ]
Just use your telnet or ssh plugins available in Java.


Arnold

On Monday, September 08, 2003 8:29 AM, mikeliu <mikeliu@netrd.iii.org.tw>
wrote:
> Because I would like to implement web configuration through Java Applet,
> this program is
> expectecd to recieve remote commands then pass them to vtysh.
> Can I find a similar program in Rancid?
>
> Thank you so much!!
>
>
> Mike
>
> ----- Original Message -----
> From: "Nipper, Arnold" <arnold@nipper.de>
> To: "mikeliu" <mikeliu@netrd.iii.org.tw>; <zebra@zebra.org>
> Cc: <quagga-dev@lists.quagga.net>
> Sent: Friday, September 05, 2003 5:20 PM
> Subject: [quagga-dev 224] Re: [zebra 20411] vtysh
>
>
>> On Friday, September 05, 2003 10:45 AM, mikeliu
<mikeliu@netrd.iii.org.tw>
>> wrote:
>>>> That works the same way as your sshd passes commands to sh or bash or
>>>> whatever. Nothing special.
>>>
>>> I see. But, how to write a program to pass commands to sh or bash or
vtysh
>>> instead of sshd?
>>>
>>
>> No need to re-invent the wheel. Use rancid which is a powefull tool to
>> manage network elements and also has a program to pass commands via
telnet
>> or ssh. Rancid lives at http://www.shrubbery.net/rancid/
>>
>>
>> Arnold
>>
>> _______________________________________________
>> Quagga-dev mailing list
>> Quagga-dev@lists.quagga.net
>> http://lists.quagga.net/mailman/listinfo/quagga-dev