mirror of
https://github.com/PowerShell/Win32-OpenSSH.git
synced 2025-07-25 23:14:54 +02:00
Use Powershell for everything, rather than a mix of Powershell and command. Also fix Win32-OpenSSH#55.
parent
ebade13f49
commit
b32f618d43
@ -1,16 +1,17 @@
|
|||||||
1. Download [Zip file](https://github.com/PowerShell/Win32-OpenSSH/releases/download/11_09_2015/OpenSSH-Win32.zip)
|
1. Download [Zip file](https://github.com/PowerShell/Win32-OpenSSH/releases/download/11_09_2015/OpenSSH-Win32.zip)
|
||||||
* Extract contents
|
* Extract contents to `C:\Program Files\OpenSSH-Win32`
|
||||||
|
* Start Powershell as Administrator
|
||||||
|
* cd C:\Program Files\OpenSSH-Win32
|
||||||
* Setup SSH host keys (this will generate all the 'host' keys that sshd expects when its starts)
|
* Setup SSH host keys (this will generate all the 'host' keys that sshd expects when its starts)
|
||||||
* `ssh-keygen.exe -A`
|
* `./ssh-keygen.exe -A`
|
||||||
* Open Firewall
|
* Open Firewall
|
||||||
* start PowerShell
|
|
||||||
* `New-NetFirewallRule -Protocol TCP -LocalPort 22 -Direction Inbound -Action Allow -DisplayName SSH`
|
* `New-NetFirewallRule -Protocol TCP -LocalPort 22 -Direction Inbound -Action Allow -DisplayName SSH`
|
||||||
* If you need key-based authentication:
|
* If you need key-based authentication:
|
||||||
* Install key-auth package
|
* Install key-auth package
|
||||||
* run setup-ssh-lsa.cmd
|
* run setup-ssh-lsa.cmd
|
||||||
* reboot
|
* reboot
|
||||||
* Install and run daemon as NT Service running as Local System
|
* Install and run daemon as NT Service running as Local System
|
||||||
* `sshd.exe install`
|
* `./sshd.exe install`
|
||||||
* `net start sshd`
|
* `net start sshd`
|
||||||
* To uninstall - `net stop sshd` ; `sshd.exe uninstall`
|
* To uninstall - `net stop sshd` ; `./sshd.exe uninstall`
|
||||||
* Make the service start on boot (PowerShell): `Set-Service sshd -StartupType Automatic`
|
* Make the service start on boot (PowerShell): `Set-Service sshd -StartupType Automatic`
|
Loading…
x
Reference in New Issue
Block a user