Send Break to terminal server

Avis avis at speakeasy.net
Thu Jan 22 16:36:32 EST 2004


After some research, I found that TeraTerm Pro was able to do send the break
using SSH version 1.
The protocol openssh implements is for SSH version 2.
As far as I know, there were no documented standards for sending breaks in
SSH version 1.

However, I'm still curious on how TeraTerm Pro did it, and wonder if openssh
should implements it for compatibility.
The terminal server in question is 'MRV'.

I am also quite sure MRV does not support the SSH version 2 standard for
sending breaks, as I turned on confirmation (last parameter in
channel_request_start), and I got 

"dispatch_protocol_error: type 100 seq 13"


-----Original Message-----
From: Darren Tucker [mailto:dtucker at zip.com.au] 
Sent: Friday, January 09, 2004 7:58 PM
To: Avis
Cc: openssh-unix-dev at mindrot.org
Subject: Re: Send Break to terminal server

Avis wrote:

> Darren, thanks.
> I did try all combinations of '~b', '~B', '~<ctrl-B>', and even
'~<alt-B>'.
> With the debug, it's obvious that you were right, '~B' was the one that
> triggered the request break.
> However, nothing happen in the request break function.
> Is there something I need to set in the compilation?
> Is there a library that I am missing?

No, there's nothing else to be done at compile time, and according to 
the debugging the break request is being sent just fine.

> bash-2.03# debug2: channel 0: request break
> ~B
> debug2: channel 0: written 4 to efd 7

It's possible that your terminal server does not like the length of the 
break requested (OpenSSH hard-codes that to 1000 ms).  You can fiddle 
with that at compile time, it's in clientloop.c around line 585:

case 'B':
	if (compat20) {
		snprintf(string, sizeof string,
		    "%cB\r\n", escape_char);
		buffer_append(berr, string,
		    strlen(string));
 

channel_request_start(session_ident,
		    "break", 0);
		packet_put_int(1000);
		packet_send();
	}

You can try changing the number inside the packet_put_int (I suggest 
trying "0" first as that the server should use "500ms or the default 
BREAK signal length of the chipset or underlying chipset driver.")

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
     Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.





More information about the openssh-unix-dev mailing list