public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* windows-to-windows openssh buffering issue
@ 2011-06-17  2:20 Nathan Ridge
  2011-06-17 15:52 ` Larry Hall (Cygwin)
  2011-06-18  9:25 ` Nathan Ridge
  0 siblings, 2 replies; 7+ messages in thread
From: Nathan Ridge @ 2011-06-17  2:20 UTC (permalink / raw)
  To: cygwin


Hello,

I am ssh-ing from one windows machine A into another windows machine B,

and I have a problem related to output buffering.

 

I am using Cygwin's OpenSSH as both the client on A and the server on B.

 

The problem is that the output of the program I'm running is being fully

buffered, i.e. the output shows up in large chunks and often much later

than it should.

 

I have searched the mailing list archives, and I found a post ([1])

explaining that there are two ways of running cygwin - in a native

windows console, or in a "pty" like rxvt - and that native Windows

programs experience this buffering problem when run in pty mode.

 

In my case:

  - the program I'm trying to run after ssh-ing into B is a native 

    windows program (and I can't recompile it to change the

    buffering behaviour or anything)

  - the Cygwin terminal I use to ssh from on machine A is a native

    windows console, NOT rxvt

  - nonetheless, I experience the buffering problem

 

Note that when I run the program on machine A, the buffering is fine.

Only when I ssh into machine B, is the buffering messed up. It seems

the program on machine B is somehow running in "pty" mode, even though

I am ssh-ing from a native windows console on machine A.

 

Is there some setting for OpenSSH on the server side that would allow

me to run the program on machine B in native-windows non-pty mode

so that the buffering is fine? If not, what else can I do?

 

Thanks,

Nate.

 

[1] http://cygwin.com/ml/cygwin/2006-12/msg00151.html 		 	   		  

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: windows-to-windows openssh buffering issue
  2011-06-17  2:20 windows-to-windows openssh buffering issue Nathan Ridge
@ 2011-06-17 15:52 ` Larry Hall (Cygwin)
  2011-06-18  9:25 ` Nathan Ridge
  1 sibling, 0 replies; 7+ messages in thread
From: Larry Hall (Cygwin) @ 2011-06-17 15:52 UTC (permalink / raw)
  To: cygwin

On 6/16/2011 10:20 PM, Nathan Ridge wrote:
> Is there some setting for OpenSSH on the server side that would allow
> me to run the program on machine B in native-windows non-pty mode
> so that the buffering is fine? If not, what else can I do?

No.  OpenSSH uses ptys - it doesn't matter what terminal or console you're
using.  I don't know of a way to make OpenSSH behave the way you want it to
with Windows console programs.

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: windows-to-windows openssh buffering issue
  2011-06-17  2:20 windows-to-windows openssh buffering issue Nathan Ridge
  2011-06-17 15:52 ` Larry Hall (Cygwin)
@ 2011-06-18  9:25 ` Nathan Ridge
  2011-06-19  3:31   ` Larry Hall (Cygwin)
  2011-06-19  8:36   ` Nathan Ridge
  1 sibling, 2 replies; 7+ messages in thread
From: Nathan Ridge @ 2011-06-18  9:25 UTC (permalink / raw)
  To: Cygwin Mailing List


On Fri, 17 Jun 2011 11:52:35, Larry Hall wrote:

> On 6/16/2011 10:20 PM, Nathan Ridge wrote: 
> 
>> Is there some setting for OpenSSH on the server side that would allow
>> me to run the program on machine B in native-windows non-pty mode
>> so that the buffering is fine? If not, what else can I do?
>
> No. OpenSSH uses ptys - it doesn't matter what terminal or console you're
> using. I don't know of a way to make OpenSSH behave the way you want it to
> with Windows console programs.

Is this issue particular to OpenSSH, or is ssh-ing into to a windows machine 
a lost cause in general?
 
Thanks,
Nate. 		 	   		  

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: windows-to-windows openssh buffering issue
  2011-06-18  9:25 ` Nathan Ridge
@ 2011-06-19  3:31   ` Larry Hall (Cygwin)
  2011-06-19  8:36   ` Nathan Ridge
  1 sibling, 0 replies; 7+ messages in thread
From: Larry Hall (Cygwin) @ 2011-06-19  3:31 UTC (permalink / raw)
  To: cygwin

On 6/18/2011 5:25 AM, Nathan Ridge wrote:
>
> On Fri, 17 Jun 2011 11:52:35, Larry Hall wrote:
>
>> On 6/16/2011 10:20 PM, Nathan Ridge wrote:
>>
>>> Is there some setting for OpenSSH on the server side that would allow
>>> me to run the program on machine B in native-windows non-pty mode
>>> so that the buffering is fine? If not, what else can I do?
>>
>> No. OpenSSH uses ptys - it doesn't matter what terminal or console you're
>> using. I don't know of a way to make OpenSSH behave the way you want it to
>> with Windows console programs.
>
> Is this issue particular to OpenSSH, or is ssh-ing into to a windows machine
> a lost cause in general?

Since non-Cygwin executables don't understand ptys, they think they are
dealing with a pipe and so they buffer their output.  It's not specific
to OpenSSH.  You'd see the same issue running these programs under xterm
or mintty.  I personally wouldn't define anything about this particular
issue as a "lost cause" but YMMV.  Quite some time ago there was an attempt
to smooth out this issue with a utility call ttyfier but it had it's issues
and has pretty much disappeared.  I don't know of any other aids out there,
though that doesn't mean there isn't something .  The only things I can
suggest are that you make sure there's not some Cygwin utility that does what
you want or that you write something that does.

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: windows-to-windows openssh buffering issue
  2011-06-18  9:25 ` Nathan Ridge
  2011-06-19  3:31   ` Larry Hall (Cygwin)
@ 2011-06-19  8:36   ` Nathan Ridge
  2011-06-20 13:37     ` Larry Hall (Cygwin)
  1 sibling, 1 reply; 7+ messages in thread
From: Nathan Ridge @ 2011-06-19  8:36 UTC (permalink / raw)
  To: Cygwin Mailing List


On Sat, 18 Jun 2011 23:31:12, Larry Hall wrote
 
> On 6/18/2011 5:25 AM, Nathan Ridge wrote:
> 
>> On Fri, 17 Jun 2011 11:52:35, Larry Hall wrote:
>>
>>> On 6/16/2011 10:20 PM, Nathan Ridge wrote:
>>>
>>>> Is there some setting for OpenSSH on the server side that would allow
>>>> me to run the program on machine B in native-windows non-pty mode
>>>> so that the buffering is fine? If not, what else can I do?
>>>
>>> No. OpenSSH uses ptys - it doesn't matter what terminal or console you're
>>> using. I don't know of a way to make OpenSSH behave the way you want it to
>>> with Windows console programs.
>>
>> Is this issue particular to OpenSSH, or is ssh-ing into to a windows machine
>> a lost cause in general?
>>
> Since non-Cygwin executables don't understand ptys, they think they are
> dealing with a pipe and so they buffer their output.  It's not specific
> to OpenSSH.  You'd see the same issue running these programs under xterm
> or mintty.  I personally wouldn't define anything about this particular
> issue as a "lost cause" but YMMV.  Quite some time ago there was an attempt
> to smooth out this issue with a utility call ttyfier but it had it's issues
> and has pretty much disappeared.  I don't know of any other aids out there,
> though that doesn't mean there isn't something .  The only things I can
> suggest are that you make sure there's not some Cygwin utility that does what
> you want or that you write something that does.
 
What I meant was, is it possible to write a different SSH server implementation
for windows - perhaps a native one - that doesn't suffer from this problem?
(And if so, do you know of one?) Or would all attempts at an SSH server
implementation run into this issue?
 
Thanks,
Nate. 		 	   		  

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: windows-to-windows openssh buffering issue
  2011-06-19  8:36   ` Nathan Ridge
@ 2011-06-20 13:37     ` Larry Hall (Cygwin)
  2011-06-20 14:28       ` DePriest, Jason R.
  0 siblings, 1 reply; 7+ messages in thread
From: Larry Hall (Cygwin) @ 2011-06-20 13:37 UTC (permalink / raw)
  To: cygwin

On 6/19/2011 4:36 AM, Nathan Ridge wrote:
>
> On Sat, 18 Jun 2011 23:31:12, Larry Hall wrote
>
>> On 6/18/2011 5:25 AM, Nathan Ridge wrote:
>>
>>> On Fri, 17 Jun 2011 11:52:35, Larry Hall wrote:
>>>
>>>> On 6/16/2011 10:20 PM, Nathan Ridge wrote:
>>>>
>>>>> Is there some setting for OpenSSH on the server side that would allow
>>>>> me to run the program on machine B in native-windows non-pty mode
>>>>> so that the buffering is fine? If not, what else can I do?
>>>>
>>>> No. OpenSSH uses ptys - it doesn't matter what terminal or console you're
>>>> using. I don't know of a way to make OpenSSH behave the way you want it to
>>>> with Windows console programs.
>>>
>>> Is this issue particular to OpenSSH, or is ssh-ing into to a windows machine
>>> a lost cause in general?
>>>
>> Since non-Cygwin executables don't understand ptys, they think they are
>> dealing with a pipe and so they buffer their output.  It's not specific
>> to OpenSSH.  You'd see the same issue running these programs under xterm
>> or mintty.  I personally wouldn't define anything about this particular
>> issue as a "lost cause" but YMMV.  Quite some time ago there was an attempt
>> to smooth out this issue with a utility call ttyfier but it had it's issues
>> and has pretty much disappeared.  I don't know of any other aids out there,
>> though that doesn't mean there isn't something .  The only things I can
>> suggest are that you make sure there's not some Cygwin utility that does what
>> you want or that you write something that does.
>
> What I meant was, is it possible to write a different SSH server implementation
> for windows - perhaps a native one - that doesn't suffer from this problem?
> (And if so, do you know of one?) Or would all attempts at an SSH server
> implementation run into this issue?

ptys are a means to an end.  They are not a requirement to implement SSH
or anything else for that matter, if that's what you're asking.  I'm not
aware of many other SSH implementations on Windows.  MKS and SFU each
have one.  I haven't used them though.

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: windows-to-windows openssh buffering issue
  2011-06-20 13:37     ` Larry Hall (Cygwin)
@ 2011-06-20 14:28       ` DePriest, Jason R.
  0 siblings, 0 replies; 7+ messages in thread
From: DePriest, Jason R. @ 2011-06-20 14:28 UTC (permalink / raw)
  To: cygwin

On Mon, Jun 20, 2011 at 8:36 AM, Larry Hall (Cygwin) <> wrote:
> On 6/19/2011 4:36 AM, Nathan Ridge wrote:
>> What I meant was, is it possible to write a different SSH server
>> implementation
>> for windows - perhaps a native one - that doesn't suffer from this
>> problem?
>> (And if so, do you know of one?) Or would all attempts at an SSH server
>> implementation run into this issue?
>
> ptys are a means to an end.  They are not a requirement to implement SSH
> or anything else for that matter, if that's what you're asking.  I'm not
> aware of many other SSH implementations on Windows.  MKS and SFU each
> have one.  I haven't used them though.
>
> --
> Larry

Tectia (owner of the ssh.com URL) sells a product that isn't based on
OpenSSH at all.  It isn't free or open source so you'll have to give
them money, but if you want to read up on it, here is their website:
http://www.tectia.com/en/en.iw3

It's been years since I've used it.  I used it before they changed
their name to Tectia but I'm pretty sure it is still SSH under the
hood.

-Jason

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-06-20 14:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-17  2:20 windows-to-windows openssh buffering issue Nathan Ridge
2011-06-17 15:52 ` Larry Hall (Cygwin)
2011-06-18  9:25 ` Nathan Ridge
2011-06-19  3:31   ` Larry Hall (Cygwin)
2011-06-19  8:36   ` Nathan Ridge
2011-06-20 13:37     ` Larry Hall (Cygwin)
2011-06-20 14:28       ` DePriest, Jason R.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).