Darren Tucker
2015-Apr-09 02:56 UTC
Tera Term, Unexpected SSH2 message(80) on current stage(6) [was Re: SAP-2015-3-1 issues]
On Thu, Apr 9, 2015 at 12:28 PM, Bryan Drewery <bryan at shatow.net> wrote:> > It seems that Tera Term has fixed this but not yet released a build with > it. > > http://en.sourceforge.jp/ticket/browse.php?group_id=1412&tid=35010 > http://en.sourceforge.jp/projects/ttssh2/scm/svn/commits/5829Reading that change it looks like Tera Term before that change would also crash when ClientAliveInterval is enabled on the server? This patch fixes it in OpenSSH for me:> https://people.freebsd.org/~bdrewery/patches/ttssh-host-keys.diff >-- 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.
Bryan Drewery
2015-Apr-09 03:07 UTC
Tera Term, Unexpected SSH2 message(80) on current stage(6) [was Re: SAP-2015-3-1 issues]
On 4/8/2015 9:56 PM, Darren Tucker wrote:> On Thu, Apr 9, 2015 at 12:28 PM, Bryan Drewery <bryan at shatow.net > <mailto:bryan at shatow.net>> wrote: > > It seems that Tera Term has fixed this but not yet released a build > with it. > > http://en.sourceforge.jp/ticket/browse.php?group_id=1412&tid=35010 > http://en.sourceforge.jp/projects/ttssh2/scm/svn/commits/5829 > > > Reading that change it looks like Tera Term before that change would > also crash when ClientAliveInterval is enabled on the server?I see what you're saying but I am unable to create any error by enabling ClientAliveInterval. I set it to 1 and get no errors on the client. sshd debugging: debug2: channel 0: request keepalive at openssh.com confirm 1 debug2: tcpwinsz: 65700 for connection: 3 debug2: tcpwinsz: 65700 for connection: 3 debug1: Got 100/16 for keepalive debug2: tcpwinsz: 65700 for connection: 3 debug2: channel 0: request keepalive at openssh.com confirm 1 debug2: tcpwinsz: 65700 for connection: 3 debug2: tcpwinsz: 65700 for connection: 3 debug1: Got 100/17 for keepalive debug2: tcpwinsz: 65700 for connection: 3 debug2: channel 0: request keepalive at openssh.com confirm 1 debug2: tcpwinsz: 65700 for connection: 3 debug2: tcpwinsz: 65700 for connection: 3 debug1: Got 100/18 for keepalive debug2: tcpwinsz: 65700 for connection: 3 debug2: channel 0: request keepalive at openssh.com confirm 1 debug2: tcpwinsz: 65700 for connection: 3 debug2: tcpwinsz: 65700 for connection: 3 debug1: Got 100/19 for keepalive debug2: tcpwinsz: 65700 for connection: 3 I think it just ignores the SSH2_MSG_GLOBAL_REQUEST packets once it is fully connected. Seeing them before the full connection is unexpected to it as the error seems to imply (Unexpected... on current stage). I don't see anything in ssh.c handling keepalive messages.> > This patch fixes it in OpenSSH for me: > https://people.freebsd.org/~bdrewery/patches/ttssh-host-keys.diff > >
Darren Tucker
2015-Apr-09 04:02 UTC
Tera Term, Unexpected SSH2 message(80) on current stage(6) [was Re: SAP-2015-3-1 issues]
On Thu, Apr 9, 2015 at 1:07 PM, Bryan Drewery <bryan at shatow.net> wrote:> On 4/8/2015 9:56 PM, Darren Tucker wrote:ading that change it looks like > Tera Term before that change would > > also crash when ClientAliveInterval is enabled on the server? > > I see what you're saying but I am unable to create any error by enabling > ClientAliveInterval. I set it to 1 and get no errors on the client. sshd > debugging: > > debug2: channel 0: request keepalive at openssh.com confirm 1 >Those are channel requests not global requests. sshd does this in serverloop.c: if ((channel_id = channel_find_open()) == -1) { packet_start(SSH2_MSG_GLOBAL_REQUEST); packet_put_cstring("keepalive at openssh.com"); packet_put_char(1); /* boolean: want reply */ } else { channel_request_start(channel_id, "keepalive at openssh.com", 1); } and Tera Term seems to handle the channel requests just fine. Presumably if you could get a connection with no active channels (ie the equivalent of ssh -N) then perhaps it'd have a problem, or perhaps that's not even possible with that client. -- 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.