Re: Is it possible to send a Control-C?

96 views
Skip to first unread message

Alexey Gavrilov

unread,
Feb 4, 2016, 12:31:08 PM2/4/16
to Jon August, Yet another Expect for Java
Hi,

What have you tried so far?  Have you tried something like: expect.sendBytes(new byte[] {3});
What ssh library are you using? Are you configuring terminal type (VT100) on your end?

Regards,
Alexey


On 04 Feb 2016, at 17:25, Jon August <jona...@gmail.com> wrote:

I'm interrogating terminal servers to see what's connected on each port.  For Cisco devices, if you send a Control-C to the device when you receive the login prompt, the device will reset and during the reset it announces the name of the device.

I would like to do that, but I'm having trouble with the syntax of sending a control character.

Any help is appreciated.

Thanks,
    -Jon


--
You received this message because you are subscribed to the Google Groups "Yet another Expect for Java" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-expecti...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jon August

unread,
Feb 4, 2016, 3:49:56 PM2/4/16
to Yet another Expect for Java, jona...@gmail.com, Alexey1....@gmail.com
I will give this a shot.  I was trying to use this:

String controlC = "\u0003";

I realized I didn't have telnet working properly to begin with.
Reply all
Reply to author
Forward
0 new messages