Window Server 2012 - SFTP

First of all you need to download this application,
Openssh

Extract the package to C:\openssh
powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1



Generate Server keys by running the following commands from c:\openssh
.\ssh-keygen.exe -A

Open a port for the SSH server in Windows Firewall:
New-NetFirewallRule -Protocol TCP -LocalPort 22 -Direction Inbound -Action Allow -DisplayName SSH

To allow a public key authentication, as an Administrator, from C:\openssh, run:
powershell.exe -ExecutionPolicy Bypass -File install-sshlsa.ps1 

Restart the Server

Locate this files C:\openssh\sshd_config and change it to 
Subsystem sftp C:\openssh\sftp-server.exe

Start the service and/or configure automatic start:

Go to Control Panel > System and Security > Administrative Tools and open Services. Locate SSHD service.

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.

C:\openssh>ssh-keygen.exe -l -f ssh_host_rsa_key -E md5

Connect to the SFTP Server using WINSCP

Comments

  1. Visit miditech India
    This is an amazing blog and full of informative contents. I am looking forward for more informative blogs.

    ReplyDelete
    Replies
    1. Thanks for the compliment, I will create more articles in the coming days

      Delete
  2. This comment has been removed by the author.

    ReplyDelete

Post a Comment

Popular posts from this blog

Window Server 2016 - Configuring Radius Server

Window Server 2012 Hardening Checklist

Networking "IT"