mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-04-08 19:35:37 +02:00
Fix ssh client not executing shell cmd given as argument
"ssh user@host whoami" now works and will show the whoami command output. sshd server was fine but ssh client was not working.
This commit is contained in:
parent
3c6c8c3ca5
commit
889e58c056
@ -877,7 +877,7 @@ do_exec_no_pty(Session *s, const char *command)
|
|||||||
|
|
||||||
GetUserName(name, &size);
|
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
|
// 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
|
char *inittermseq = "\033[20h\033[?7h\0" ; // LFtoCRLF AUTOWRAPON
|
||||||
Channel *c=channel_by_id ( s->chanid );
|
Channel *c=channel_by_id ( s->chanid );
|
||||||
|
4
ssh.c
4
ssh.c
@ -1534,6 +1534,10 @@ main(int ac, char **av)
|
|||||||
HANDLE hInput = GetStdHandle(STD_INPUT_HANDLE);
|
HANDLE hInput = GetStdHandle(STD_INPUT_HANDLE);
|
||||||
ConInit( STD_OUTPUT_HANDLE, TRUE ); //init the output console surface for us to write
|
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
|
#endif
|
||||||
|
|
||||||
exit_status = compat20 ? ssh_session2() : ssh_session();
|
exit_status = compat20 ? ssh_session2() : ssh_session();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user