OpenSSH, SSH.exe, Windows XP, C++ executable _getche() not getting used - SSH

This is a discussion on OpenSSH, SSH.exe, Windows XP, C++ executable _getche() not getting used - SSH ; I've built a tiny executable in with MS Visual C++ that listens to console input using the _getche() C runtime command. When I execute it under an SSH logon, the console input doesn't get directed into the application. SSH is ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: OpenSSH, SSH.exe, Windows XP, C++ executable _getche() not getting used

  1. OpenSSH, SSH.exe, Windows XP, C++ executable _getche() not getting used

    I've built a tiny executable in with MS Visual C++ that listens to
    console input using the _getche() C runtime command. When I execute
    it under an SSH logon, the console input doesn't get directed into the
    application. SSH is *very* new to me, so I don't understand what is
    happening.

    The same application running in a Telnet session will hit _getche()
    and exit when the user types a Y into the console.

    What do I need to do for the application to receive user input running
    in an SSH session?

    Here is the code I've compiled:

    --------------------------------
    #include "stdafx.h"

    #include
    #include

    int _tmain(int argc, _TCHAR* argv[])
    {
    int ch;

    _cputs( "Type 'Y' when finished typing keys:\n" );
    do
    {
    ch = _getche();
    ch = toupper( ch );
    } while( ch != 'Y' );

    _putch( '\n' );

    return 0;
    }
    --------------------------------

    Many thanks,
    John


  2. Re: OpenSSH, SSH.exe, Windows XP, C++ executable _getche() notgetting used

    On Oct 3, 11:55 am, jmartzoo-goo...@yahoo.com wrote:

    > What do I need to do for the application to receive user input running
    > in an SSH session?


    Are there any settings in PuTTY's Remote terminal settings
    that might help achieve this goal?

    Is it something simple that can be achieved by tweaking the tty
    emulation settings? Why does Telnet behave one way and SSH
    differently?

    Thanks in advance,
    John

  3. Re: OpenSSH, SSH.exe, Windows XP, C++ executable _getche() notgetting used

    On Nov 15, 12:02 pm, "jmartzoo-goo...@yahoo.com" goo...@yahoo.com> wrote:
    > On Oct 3, 11:55 am, jmartzoo-goo...@yahoo.com wrote:
    >
    > > What do I need to do for the application to receive user input running
    > > in an SSH session?


    Is there any chance that installing more of the Cygwin library
    including a terminal emulator might help this situation?

    If we were to open the SSH session with the server and then launch a
    terminal console server side to host our application, would it provide
    the key-by-key input response and also kill the child-process upon
    disconnect?

    What might be good choices for a terminal emulator under Cygwin?

    Thanks.


+ Reply to Thread