172 Commits

Author SHA1 Message Date
Manoj Ampalam
03ade97966 Merge branch 'L1' 2_25_2016 2016-02-25 14:42:29 -08:00
quamrulmina
1f825c7e30 sftp client lls did not work in Windows if cygwin or linux ls not available
Now lls is mapped to "dir" in Windows port which is available in Windows
shell (cmd or powershell ). Cygwin or Linux emulation tools which has
"ls" are not needed.
2016-02-24 23:23:39 -06:00
manojampalam
7181f2b3d3 Merge pull request #118 from szepeviktor/patch-1
Adding Chocolatey badges
2016-02-20 15:58:03 -08:00
Viktor Szépe
907848880e Adding Chocolatey badges 2016-02-19 11:26:53 +01:00
Manoj Ampalam
52a5a6ac92 Merge branch 'L1' of https://github.com/PowerShell/Win32-OpenSSH into L1 2016-02-09 11:41:36 -08:00
Manoj Ampalam
88f4c54f66 OpenSSL build script from David 2016-02-09 11:41:26 -08:00
quamrulmina
f3c841824e Improve sshd Pluggable remote console enhancements
pluggable binaries are to reside in the same directory where sshd.exe is
located
2016-02-02 02:02:56 -06:00
Manoj Ampalam
3a1808037d Merge branch 'L1' 2016-02-01 22:54:32 -08:00
arif-pragmasys
9f47848ee6 Fix linux build by adding new crypto files 2016-02-01 16:49:53 -06:00
dkulwin
384cd18b56 Add abstraction interface for elliptic points and elliptic diffie hellman 2016-02-01 11:27:52 -06:00
quamrulmina
829f799ad9 Add pluggable access to shell session so that cmd & powershell runs like natively
#define WIN32_PRAGMA_REMCON in config.h.vs or in channels.c, session.c
and sshpty.c files . cmdserver.exe runtime in Pragma Fortress SSH
package needed to access shell session.
2016-02-01 04:10:36 -06:00
quamrulmina
f43f33da8b Fix sshd.log file to be created in the correct place
sshd.log of child was created in root / directory. It should be in the
directory where sshd.exe binary is located. Otherwise logged data were
not being found in the central sshd.log file where user's expect.
2016-01-29 02:53:53 -06:00
quamrulmina
802d9a3349 Fix #71; Env vars like APPDATA, LOCALAPPDATA etc in sshd are set correctly now.
APPDATA, LOCALAPPDATA, HOMEDRIVE, HOMEPATH set correctly in sshd server
2016-01-27 18:20:11 -06:00
dkulwin
44d8ddddb1 Implement generic interface for bignum and diffie-hellman
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..
2016-01-16 16:10:16 -06:00
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
quamrulmina
8f42a2f376 ssh client roaming bug fix applied.
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
2016-01-14 15:15:24 -06:00
dkulwin
5bc1a58689 Add CNG KEX hooks
Add conditional hooks to use CNG for KEX.  Switches based upon USE_MSCNG
define
2016-01-08 13:42:08 -06:00
dkulwin
02e784565a Add CNG KEX support routine
CNG KEX support for Group1, Group14 and Group Exchange .
2016-01-08 13:40:55 -06:00
dkulwin
67c7a3c003 Add os compatibility to manifests
Microsoft version apis distinguish operating systems beyond window 8 if
there isn't a manifest entry for os compatibility.
2016-01-08 13:35:55 -06:00
dkulwin
bae340a957 Ignore visual studio database files 2016-01-08 13:32:22 -06:00
quamrulmina
d77657997c scp dependency libraries added for scp to build correctly
openbsd_compat.lib libssh  config win32compat dependencies added
2016-01-04 17:24:41 -06:00
quamrulmina
65df6a412c Fix PathCanonicalize() API not being found for win32 build
Add shlwapi.h to access the prototype of the function of
PathCanonicalize()
2016-01-04 17:21:50 -06:00
quamrulmina
6301972e69 Add multiple ../../.. support in sftp-server for changing directories or get/put
Before one could provide only one .. ; now it can be any numbers. cd
../../..  or get ../backup/myfile.c  --- all these formations now work.
2015-12-31 17:06:32 -06:00
quamrulmina
39c00bff7e Fix sftp-server to have process_setstat() work correctly in Win32
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.
2015-12-31 01:12:33 -06:00
quamrulmina
332890c330 WinSCP client now works with win32 sftp-server as readlink now supported in Win32 sftp-server
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.
2015-12-30 18:31:11 -06:00
quamrulmina
8c92d7bd95 fix sftp-server to be able to show directories that are linked to other point
"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.
2015-12-30 17:17:56 -06:00
quamrulmina
46327a98b1 fix sftp-server not showing first entry in listing; code ls -l to show file attributes correctly
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.
2015-12-29 22:05:37 -06:00
quamrulmina
4857c272b9 Add driver letter support to sftp-server and let it form external path with / to meet spec
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.
2015-12-29 03:12:56 -06:00
quamrulmina
102d1ed6b6 scp needs this windows header file for 32bit win32
shlwapi.h needs to be included to access PathCanonicalize() win32 API
for 32 bit version in Visual Studio 2015.
2015-12-22 18:36:10 -06:00
Steve Lee
a5917da436 Merge pull request #53 from mikemaccana/patch-2
README: make install instructions more obvious
2015-12-22 13:44:19 -08:00
quamrulmina
3cdffbc29e ssh-add.exe being fixed to work in Windows
setvbuf to avoid in Windows for stdio
12_22_2015
2015-12-22 14:58:19 -06:00
Mike MacCana
c9d08ba419 README: make install instructions more obvious
+ small tweaks.
2015-12-21 12:21:14 +00:00
quamrulmina
f8f10e1911 Fixed #49. server identification string unhelpfully generic.
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.
2015-12-14 16:45:55 -06:00
quamrulmina
750b52e4d4 Fixed #23: ssh does not work properly with ~/.ssh/config file
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
2015-12-11 16:23:31 -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
a08b1c8a7c update scp.c to work in mingw compiler for win32 2015-12-07 01:41:39 -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
298c353755 Add SCP project to solution 2015-12-04 13:23:46 -06:00
quamrulmina
66426d7369 Fix #21 -- ssh client cannot issue commands to Tectia sshd server
Will work with Tectia server 6.3.6 and all Tectia ssh servers. Tested
with latest Tectia ssh server 6.4.12
2015-11-20 18:13:32 -06:00
quamrulmina
2923fc644f ssh client restores previous screen colors after a tty session has ended
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.
2015-11-20 15:05:36 -06:00
dkulwin
5752a7e550 Remove EditAndContinue selection for debug configurations.
Replaced by standard /Zi database option
2015-11-19 15:29:17 -06:00
quamrulmina
cbdfedff94 sshd sets ssh client tty mode to original state after a tty session has ended
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.
2015-11-19 00:35:59 -06:00
quamrulmina
5b34ab66d8 sshd server to avoid closing child handle if already closed
was causing exception in debugger otherwise.
2015-11-16 18:20:36 -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
937f2e02cc ssh-lsa project changes
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).
2015-11-13 22:01:06 -06:00
dkulwin
b45867b93c LSA visual studio work
Add exports via pragma statements and reduce included libraires
2015-11-13 11:58:51 -06:00
dkulwin
1067adc0f2 Lsa project added to visual studio solution
Lsa project added to visual studio solution
2015-11-11 15:03:49 -06:00
dkulwin
dd2bf90066 Support for Visual studio
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__ .
2015-11-11 15:03:03 -06:00
dkulwin
d34621a289 Force defines for certain errno values.
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.
2015-11-10 15:51:24 -06:00
quamrulmina
faf153b7cf msbuild cmd script to build all openssh win32 binaries using VS2015 solution
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
2015-11-09 18:39:32 -06:00