14 Commits

Author SHA1 Message Date
quamrulmina
fe136bc352 Code fixed for ssh-agent.exe and ssh-add.exe to work in Windows
ssh-agent.exe and ssh-add.exe code updated and fixed to work in Windows.
For convenience of users, ssh-agent.exe starts a cmd shell with the
"SSH_AUTH_SOCK" and "SSH_AGENT_PID" environment variables set.
ssh-add.exe can be run immediately from the cmd shell. 'ssh-add -L" and
"ssh-add id_rsa"  and "ssh-add -d id_rsa" are 3 useful commands to list,
add and delete keys from ssh-agent cache.
2016-01-16 00:05:33 -06:00
dkulwin
702daceea7 Minor changes to assertion handling
Changed the code to bring back assertion popups for everyone, but turn
off assertions around the _get_osfhandle() call in allocate_sfd().  The
original port code was designed knowing that some of the passed
parameters would be invalid, but was expecting that the call would just
fail instead of generating an assert dialog.  Turning off Asserts around
this call results in behavior similar to mingw.

Also, turn off Incremental Linking for ssh.exe since half the time, the
linker would trap on this project.
2015-12-08 12:47:35 -06:00
quamrulmina
68677bb603 scp client and server ported to work in Windows
Lot of code had to be redone as scp.exe contains both the scp client and
scp server in the same binary working in Windows needs various file
system access related changes. sshd_config file needs to add "scp"
subsystem path like we do for sftp server.
2015-12-07 00:31:07 -06:00
dkulwin
138ce33669 fix exception caused by *dword used in *size_t call parameter
The code was writing a size_t size of data to a dword.
2015-11-16 17:53:16 -06:00
dkulwin
39706fca9c Add code to stop asserts from tossing up dialogs
Assert dialogs can be a problem when running as a service.  This change
instructs assert info to be sent to stdout instead of a dialog.
2015-11-04 19:34:15 -06:00
dkulwin
ddace27b97 VC2015 doesn't like it when you take a negative of on unsigned value
Negative of an unsigned value should just be the two's complement.  Add
code to change code with negative unsigned values to two's compliment
values if compiling under visual studio.
2015-11-04 19:34:12 -06:00
quamrulmina
d4c8ef9ac5 Improved SSH client interactive mode and fixed control-c to work
Console API is now used for interactive tty mode. Thus ssh.exe client
can now pass each character to remote side as one types so that programs
like more works correctly. Control-c now will stop the remote program
instead of exiting the ssh.exe.
2015-10-27 19:05:38 -05:00
quamrulmina
339912c24b Use a Console as input to drive a shell in sshd.exe
Fixes issues like cmd.exe shell not handling backspace, control-c.
Control-c is still a work in progress and will be fixed but backspace
processing works. This work when complete will make cmd.exe shell and
powershell work better for interactive users.
2015-10-23 19:11:29 -05:00
quamrulmina
55f2ec6825 Add pty mode support code
Pty mode code added so that sshd server can do remote echo, backspace
processing. etc and ssh.exe client does not have to do local echo. We
can enrich it in future for more features and allowing programs like
powershell to run interactive. Pty mode is central for interactive use
and will be built using Windows console instead of termios that
Linux/Unix uses.
2015-10-12 13:49:15 -05:00
quamrulmina
ac89e98293 add pty support to ssh client
pty and tty support was not enabled or working in the code. Without pty
support, ssh client was very non functional - e.g. openssh linux server
prompt would not come through. Now ssh client works much better in
interactive mode ( uses pty).
2015-10-05 15:46:37 -05:00
quamrulmina
989b8a9f01 improved sshd child monitor code to avoid annoying "broken pipe" msg from Linux clients
take child detection handle out from select mux after a child process is
detected to have exited so that other code exit handlings can run its
course
2015-10-02 18:35:08 -05:00
quamrulmina
1915208a54 Fixed sshd process not ending when sftp-server and the shell ended
NoMachine did not finish coding child process ending detection logic.
Added the needed code so that child process handle is added to the
handles that WaitForMultipleObjects() waits for in nomachine select()
implementation in socket.c. Otherwise select() would be stuck in
read/write dectection even when the process of interest has exited.
2015-10-02 14:18:49 -05:00
quamrulmina
6d167ae0f6 fix sftp.exe client to work using password authentication
ssh.exe client invoked underneath was not able to send password prompt
and read password from user as stdin and stdout handles were redirected
to sockets by sftp.exe ; stderr which is not redirected is used to show
prompt to users and data is read from console
2015-09-27 23:54:10 -05:00
Arif Saikat
fb17410f60 Original Nomachine 5.9p1 source code
Original Nomachine 5.9p1 source code
2015-09-09 14:08:05 -05:00