Fixed the issue as ssh.exe was trapping if config file was in the user's
home directory. User ssh client "config" file can be given by locating
it in the user's home directory/.ssh/config . Typically it is
/users/johndoe/.ssh/config
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.
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.
ssh.exe restores console color settings for a tty session to what was
before. This is a usability improvement and a user have written an issue
(#31) for this fix.
this is a needed step for our sshd in tty mode as we ask clients to send
us CRLF as command terminator. But we must reset the mode when the tty
session ends so that sftp running after it does not encounter CRLF mode.
Linux openssh sftp client otherwise would show two lines for each
command typed when run after an ssh session to our server.
Using a module definition file gives better support to handle symbol
decorations. This change adds ssh-lsa.def to define the functions
exported from ssh-lsa.dll.
Misc. changes to ssh-lsa project (warning level, sdl check, calling
convention).
The changes necessary to support visual studio fall into 2 basic groups.
1) reordering of header files, and 2) changes to support syntax
differences between mingw and visual studio and 3). All changes are
conditional upon the definition of the macro __VS_BUILD__ .
The visual studio errno.h file is conflicting with no-machine errno
constants. Force the constants we need and define
_CRT_NO_POSIX_ERROR_CODES to avoid redefining them. This fixes port
forwarding for visual studio implementation.
Builds all x64 64bit and x86 32 bit openssh binaries Release and Debug
versions from the single Win32-OpenSSH.sln file.
1. Open a MSbuild cmd prompt for Visual Studio 2015
2. cd Win32-OpenSSH\contrib\win32\openssh directory.
3. openssh_build_cmd
For now we avoid sending the 4 arrow keys to the shell or echo it to the
remote side. as cmd.exe or powershell does not process it correctly in
stream output device mode we run win32 sshd server.
This is needed so that sftp running after a ssh session from a Linux
client does not see two lines for each line typed. CRLF is set by win32
sshd server but we have to set mode to the previous way in the client
when an interactive session has ended.
Add a utility upon which every other project is dependent, to copy the
config.h.vs file to the source root config.h. Because the target may
have changed outside of visual studio, I have disabled the dependency
check so the file will be copied with every build..
Doing so will allow sshd.exe to be launched from any directory - thereby
enabling sshd to be launched from SCM. With this change - following
works:
- sshd.exe install
- net start sshd
- net stop sshd
- sshd.exe uninstall
Use new compile flag WIN32_VS to add/change logic of sftp client and
sftp server codes so that MS Visual Studio 2015 compiler and runtime can
be used. opendir(), readdir(), closedir() directory APIs and basename()
API of Unix/Linux are implemented in Windows as they are not available
in Windows/VisualStudio C-runtime. win32_dirent.c and win32_dirent.h
files added as dirent.c and dirent.h are not available in Windows and we
do not want to affect mingW/gcc builds for Windows which have those
files available.
The mingw make files build the umac source twice with different options.
Under visual studio, its easier if we just make a separate copy with
it's own build rules.
Missing a prototype can cause a problem if we are 64-bit and the
function is returning a pointer. Add a prototype to stop the return
value from being corrupted.