Last active
December 3, 2017 14:07
-
-
Save abakum/e8b4ed4c1d5d040a886c3324c7635a0a to your computer and use it in GitHub Desktop.
openSSH on Win with RSA authorization for sftp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Protocol 2 | |
StrictModes no | |
PubkeyAuthentication yes | |
AuthorizedKeysFile c:\PortableApps\OpenSSH\authorized_keys | |
PasswordAuthentication no | |
PermitEmptyPasswords no | |
UsePAM yes | |
PidFile sshd.pid | |
Subsystem sftp sftp-server.exe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
:download from https://github.com/PowerShell/Win32-OpenSSH/releases
:unpack to c:\PortableApps\OpenSSH
cd c:\PortableApps\OpenSSH
:edit sshd_config
.\ssh-keygen -A
.\ssh-keygen -t rsa
:add id_rsa.pub to c:\PortableApps\OpenSSH\authorized_keys
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
.\install-sshd.ps1
.\FixHostFilePermissions.ps1 -Confirm:$false
New-NetFirewallRule -Protocol TCP -LocalPort 22 -Direction Inbound -Action Allow -DisplayName sshd
Set-Service sshd -StartupType Automatic
Start-Service sshd