Implementation of a generic wrap interface for bignum and diffie-hellman
based upon Damien's wrap code in openssh-openbsd. This commit adds the
generic interface along with the backing code for openssl, cng, and cng
with an openssl fallback. Currently, openssl is the only provider for
bignum and the diffie-hellman generic interface is only for static and
negotiated oakley groups..
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.
Disable experimental client-side roaming support. Server side was
disabled/gutted for years already, but this aspect was surprisingly
forgotten. openssh lists this bug as CVE-2016-0777
It is described in:
http://undeadly.org/cgi?action=article&sid=20160114142733
This fix allows WinSCP upload to finish properly as updating time was
not working otherwise with driver letter support improvement. Other sftp
clients will also work better/properly now.
process_readlink() now implemented in Win32 sftp-server and linked
directories can now be read and browsed. as a result opensource WinSCP
client ( it has SFTP and SCP gui clients ) now works with our Win32
sftp-server.
"Application Data" is one such directory in a user;'s home directory. We
get inside path of to find where a directory is linked to and read that
to get contents.
changing driver letter in sftp-server tested using usb drives; missing
first entry on a top root directory is now shown correctly. ls -l output
cleaned up and now correctly show file and directory attributes.
strmode() function implemented for Windows like it is available in
Unix/Linux OS.
sftp-server now conforms to sftp rfc spec and creates external path with
/ as the first character so that programs like Winscp will now work.
Driver letters are kept below it like /x:/users/user1homedir format;
driver letters are now supported. cd /users or cd c:/users or cd
D:/users will all work now. Windows security enforces what directory or
files one can view/access.
SSH-2.0-OpenSSH_7.1p1 Microsoft_Win32_port_with_VS or
SSH-2.0-OpenSSH_7.1p1 Microsoft_Win32_port is transmitted as sshd & ssh
version based if Visual Studio or Mingw build compiler is used.
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