diff --git a/session.c b/session.c index f86f1ed..8cd6124 100644 --- a/session.c +++ b/session.c @@ -877,7 +877,7 @@ do_exec_no_pty(Session *s, const char *command) GetUserName(name, &size); - if (!(s -> is_subsystem)) { + if ( (!s -> is_subsystem) && (s ->ttyfd != -1)) { // Send to the remote client ANSI/VT Sequence so that they send us CRLF in place of LF char *inittermseq = "\033[20h\033[?7h\0" ; // LFtoCRLF AUTOWRAPON Channel *c=channel_by_id ( s->chanid ); diff --git a/ssh.c b/ssh.c index 0ee3df2..c4ca475 100644 --- a/ssh.c +++ b/ssh.c @@ -1534,6 +1534,10 @@ main(int ac, char **av) HANDLE hInput = GetStdHandle(STD_INPUT_HANDLE); ConInit( STD_OUTPUT_HANDLE, TRUE ); //init the output console surface for us to write } + else { + extern int glob_itissshclient; + glob_itissshclient = 1; // tell our contrib/win32/win32compat/socket.c code it is for ssh client side + } #endif exit_status = compat20 ? ssh_session2() : ssh_session();