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 <conio.h>
#include <ctype.h>
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