Differences

This shows you the differences between the selected revisions of the page.

2015-11-12 2015-11-12
restarting needed only after setup-ssh-lsa (martin) 11_09_2015 release supports running as a service (martin)
Line 14: Line 14:
</code> </code>
  * Open a port for the %%SSH%% server in Windows Firewall:   * Open a port for the %%SSH%% server in Windows Firewall:
-    * Either run the following PowerShell command (Windows 8 and 2012 or newer only), &win8 &win2012 as an Administrator: \\ ''New-NetFirewallRule -Protocol %%TCP%% -LocalPort 22 -Direction Inbound -Action Allow -DisplayName %%SSH%%''+    * Either run the following PowerShell command (Windows 8 and 2012 or newer only), &win8 &win2012 as the Administrator: \\ ''New-NetFirewallRule -Protocol %%TCP%% -LocalPort 22 -Direction Inbound -Action Allow -DisplayName %%SSH%%''
    * or go to //Control Panel > System and Security > Windows Firewall > Advanced Settings > Inbound Rules// and add a new rule for port 22. &wincp     * or go to //Control Panel > System and Security > Windows Firewall > Advanced Settings > Inbound Rules// and add a new rule for port 22. &wincp
  * To allow a public key authentication, as an Administrator, run: \\ ''C:\openssh\setup-ssh-lsa.cmd'' \\ and restart the machine   * To allow a public key authentication, as an Administrator, run: \\ ''C:\openssh\setup-ssh-lsa.cmd'' \\ and restart the machine
  * In ''C:\openssh\sshd_config'' locate a ''Subsystem sftp'' directive and change the path to ''sftp-server'' to its Windows location: \\ ''Subsystem sftp C:\openssh\sftp-server.exe''   * In ''C:\openssh\sshd_config'' locate a ''Subsystem sftp'' directive and change the path to ''sftp-server'' to its Windows location: \\ ''Subsystem sftp C:\openssh\sftp-server.exe''
-  * [[https://technet.microsoft.com/en-us/sysinternals/bb897553|Download PsTools]] and extract ''PsExec.exe'' to ''C:\openssh''+  * As the Administrator, install an SSHD service: \\ ''sshd.exe install'' 
 +  * Start the service and/or configure automatic start: 
 +    * Go to //Control Panel &gt; System and Security &gt; Administrative Tools// and open //Services//. Locate //SSHD// service. &wincp 
 +   * If you want the server to start automatically when your machine is started: Go to //Action > Properties//. In the Properties dialog, change //Startup type// to //Automatic// and confirm. 
 +····* Start the SSHD service by clicking the //Start the service//.
//These instructions are partially based on [[https://github.com/PowerShell/Win32-OpenSSH/wiki/Deploy-Win32-OpenSSH|the official deployment instructions]].// //These instructions are partially based on [[https://github.com/PowerShell/Win32-OpenSSH/wiki/Deploy-Win32-OpenSSH|the official deployment instructions]].//
Line 28: Line 32:
  * Create the ''.ssh'' folder (for the ''authorized_keys'' file) in your Windows account profile folder (typically in ''C:\Users\username\.ssh''). &winpath   * Create the ''.ssh'' folder (for the ''authorized_keys'' file) in your Windows account profile folder (typically in ''C:\Users\username\.ssh''). &winpath
  * Do not change permissions for the ''.ssh'' and the ''authorized_keys''.   * Do not change permissions for the ''.ssh'' and the ''authorized_keys''.
- 
-===== Running the server ===== 
- 
-To start the server, run the following command as an Administrator: 
- 
-<code> 
-C:\openssh\PsExec.exe -i -s -w "C:\openssh" C:\openssh\sshd.exe 
-</code> 
- 
-The OpenSSH for Windows does not support running as a service yet, but it [[http://blogs.msdn.com/b/powershell/archive/2015/10/19/openssh-for-windows-update.aspx|should be available soon]]. 
===== Connecting to the server ===== ===== Connecting to the server =====

Last modified: by martin