<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>OpenSSH | KC's Blog</title>
	<atom:link href="https://www.kjctech.net/tag/openssh/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.kjctech.net</link>
	<description></description>
	<lastBuildDate>Tue, 24 Jan 2023 18:20:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://i0.wp.com/www.kjctech.net/wp-content/uploads/2016/12/cropped-KC-Logo.png?fit=32%2C32&#038;ssl=1</url>
	<title>OpenSSH | KC's Blog</title>
	<link>https://www.kjctech.net</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">24634607</site>	<item>
		<title>Setting Up SFTP or SSH Server on Windows Server 2012 R2</title>
		<link>https://www.kjctech.net/setting-up-sftp-or-ssh-server-on-windows-server-2012-r2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=setting-up-sftp-or-ssh-server-on-windows-server-2012-r2</link>
					<comments>https://www.kjctech.net/setting-up-sftp-or-ssh-server-on-windows-server-2012-r2/#comments</comments>
		
		<dc:creator><![CDATA[Kent Chen]]></dc:creator>
		<pubDate>Thu, 14 Sep 2017 04:34:19 +0000</pubDate>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[OpenSSH]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Windows Server 2012]]></category>
		<guid isPermaLink="false">https://www.kjctech.net/?p=3670</guid>

					<description><![CDATA[<p>If you need an SFTP server, you can set it up easily on a Linux box since it&#8217;s supported out of the box. But if you&#8217;d like to set up one on Windows, you need to do some extra work since SFTP is not natively supported on Windows. Don&#8217;t get confused it with the FTPS, short for FTP over SSL, which [&#8230;]</p>
The post <a href="https://www.kjctech.net/setting-up-sftp-or-ssh-server-on-windows-server-2012-r2/">Setting Up SFTP or SSH Server on Windows Server 2012 R2</a> first appeared on <a href="https://www.kjctech.net">KC's Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>If you need an SFTP server, you can set it up easily on a Linux box since it&#8217;s supported out of the box. But if you&#8217;d like to set up one on Windows, you need to do some extra work since SFTP is not natively supported on Windows. Don&#8217;t get confused it with the FTPS, short for FTP over SSL, which is supported out of the box with IIS on Windows Servers.</p>
<h2>Steps to set up a SFTP/SSH server using OpenSSH on Windows Server 2012 R2</h2>
<p>1. Download the latest <a href="https://github.com/PowerShell/Win32-OpenSSH/releases" target="_blank" rel="noopener">OpenSSH for Windows binaries</a>. Choose the OpenSSH-Win64.zip package.</p>
<p>2. Extract the package and save them to <strong>C:\Program Files\OpenSSH</strong> folder.</p>
<p>3. Open an elevated PowerShell console, and run the following commands to install SSHD and ssh-agent services.</p>
<pre class="">cd "\Program Files\OpenSSH"
.\install-sshd.ps1</pre>
<p>If failed due to the Policy that prevents it from executing, run this instead:</p>
<pre class="">powershell -ExecutionPolicy Bypass -File .\install-sshd.ps1</pre>
<p><a href="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-Install-OpenSSH.png?ssl=1" data-rel="lightbox-image-0" data-rl_title="" data-rl_caption="" title=""><img data-recalc-dims="1" fetchpriority="high" decoding="async" class="alignnone size-large wp-image-3671" src="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-Install-OpenSSH.png?resize=600%2C88&#038;ssl=1" alt="Server 2012 - Install OpenSSH" width="600" height="88" srcset="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-Install-OpenSSH.png?resize=600%2C88&amp;ssl=1 600w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-Install-OpenSSH.png?resize=250%2C37&amp;ssl=1 250w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-Install-OpenSSH.png?resize=450%2C66&amp;ssl=1 450w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-Install-OpenSSH.png?resize=768%2C112&amp;ssl=1 768w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-Install-OpenSSH.png?resize=700%2C102&amp;ssl=1 700w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-Install-OpenSSH.png?resize=520%2C76&amp;ssl=1 520w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-Install-OpenSSH.png?resize=360%2C53&amp;ssl=1 360w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-Install-OpenSSH.png?resize=100%2C15&amp;ssl=1 100w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-Install-OpenSSH.png?w=876&amp;ssl=1 876w" sizes="(max-width: 600px) 100vw, 600px" /></a></p>
<p>4. In the same PowerShell console, run the following commands to generate server keys and restrict an access to them.</p>
<pre class="">.\ssh-keygen.exe -A
PowerShell -ExecutionPolicy Bypass -File .\FixHostFilePermissions.ps1 -Confirm:$false</pre>
<p>5. Open an incoming port in Windows Firewall for the SSH server. You can either run the following PowerShell cmdlet to open it or do it through Windows Firewall set up from Control Panel.</p>
<pre class="">New-NetFirewallRule -Protocol TCP -LocalPort 22 -Direction Inbound -Action Allow -DisplayName SSH</pre>
<p><a href="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/PowerShell-open-ssh-port.png?ssl=1" data-rel="lightbox-image-1" data-rl_title="" data-rl_caption="" title=""><img data-recalc-dims="1" decoding="async" class="alignnone size-large wp-image-3672" src="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/PowerShell-open-ssh-port.png?resize=600%2C223&#038;ssl=1" alt="PowerShell - open SSH port" width="600" height="223" srcset="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/PowerShell-open-ssh-port.png?resize=600%2C223&amp;ssl=1 600w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/PowerShell-open-ssh-port.png?resize=250%2C93&amp;ssl=1 250w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/PowerShell-open-ssh-port.png?resize=450%2C167&amp;ssl=1 450w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/PowerShell-open-ssh-port.png?resize=768%2C285&amp;ssl=1 768w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/PowerShell-open-ssh-port.png?resize=700%2C260&amp;ssl=1 700w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/PowerShell-open-ssh-port.png?resize=520%2C193&amp;ssl=1 520w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/PowerShell-open-ssh-port.png?resize=360%2C134&amp;ssl=1 360w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/PowerShell-open-ssh-port.png?resize=100%2C37&amp;ssl=1 100w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/PowerShell-open-ssh-port.png?w=877&amp;ssl=1 877w" sizes="(max-width: 600px) 100vw, 600px" /></a></p>
<p>6. Open services window, locate the <strong>sshd</strong> service and click Start to start the service. If succeed, you are all set. And you need to change the Startup Type to Automatical so the service can be launched automatically.</p>
<p><a href="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-sshd-service.png?ssl=1" data-rel="lightbox-image-2" data-rl_title="" data-rl_caption="" title=""><img data-recalc-dims="1" decoding="async" class="alignnone size-large wp-image-3673" src="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-sshd-service.png?resize=600%2C239&#038;ssl=1" alt="sshd service" width="600" height="239" srcset="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-sshd-service.png?resize=600%2C239&amp;ssl=1 600w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-sshd-service.png?resize=250%2C100&amp;ssl=1 250w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-sshd-service.png?resize=450%2C179&amp;ssl=1 450w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-sshd-service.png?resize=768%2C306&amp;ssl=1 768w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-sshd-service.png?resize=700%2C279&amp;ssl=1 700w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-sshd-service.png?resize=520%2C207&amp;ssl=1 520w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-sshd-service.png?resize=360%2C143&amp;ssl=1 360w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-sshd-service.png?resize=100%2C40&amp;ssl=1 100w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/Server-2012-sshd-service.png?w=853&amp;ssl=1 853w" sizes="(max-width: 600px) 100vw, 600px" /></a></p>
<h2>Testing the connection to the server</h2>
<p>You can use any tools that support SSH to connect to the SSH server you just set up, such as FileZilla, WinSCP, PuTTY to name a few. Take WinSCP for example, use the server&#8217;s name as Host name, leave the Port number at 22, and type in your Windows user account info as the username and password. If it&#8217;s part of the Windows domain, use the format of <strong>domain_name\username</strong> or <strong>username@domain</strong> instead.</p>
<p><a href="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/WinSCP-connection-screen.png?ssl=1" data-rel="lightbox-image-3" data-rl_title="" data-rl_caption="" title=""><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-large wp-image-3675" src="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/WinSCP-connection-screen.png?resize=600%2C405&#038;ssl=1" alt="WinSCP - connection screen" width="600" height="405" srcset="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/WinSCP-connection-screen.png?resize=600%2C405&amp;ssl=1 600w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/WinSCP-connection-screen.png?resize=250%2C169&amp;ssl=1 250w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/WinSCP-connection-screen.png?resize=450%2C304&amp;ssl=1 450w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/WinSCP-connection-screen.png?resize=520%2C351&amp;ssl=1 520w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/WinSCP-connection-screen.png?resize=360%2C243&amp;ssl=1 360w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/WinSCP-connection-screen.png?resize=100%2C68&amp;ssl=1 100w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/WinSCP-connection-screen.png?w=626&amp;ssl=1 626w" sizes="auto, (max-width: 600px) 100vw, 600px" /></a></p>
<p>In some cases where you need to verify the fingerprint of the server, this is how you can find out:</p>
<pre class="">.\ssh-keygen.exe -l -f ssh_host_ed25519_key -E md5</pre>
<p>then, when you connect to the SSH server the first time, you can compare the info you just collected with the one popping on the screen.</p>
<p><a href="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/WinSCP-SSH-Warning.png?ssl=1" data-rel="lightbox-image-4" data-rl_title="" data-rl_caption="" title=""><img data-recalc-dims="1" loading="lazy" decoding="async" class="alignnone size-full wp-image-3676" src="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/WinSCP-SSH-Warning.png?resize=483%2C275&#038;ssl=1" alt="WinSCP - SSH Warning" width="483" height="275" srcset="https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/WinSCP-SSH-Warning.png?w=483&amp;ssl=1 483w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/WinSCP-SSH-Warning.png?resize=250%2C142&amp;ssl=1 250w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/WinSCP-SSH-Warning.png?resize=450%2C256&amp;ssl=1 450w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/WinSCP-SSH-Warning.png?resize=360%2C205&amp;ssl=1 360w, https://i0.wp.com/www.kjctech.net/wp-content/uploads/2017/09/WinSCP-SSH-Warning.png?resize=100%2C57&amp;ssl=1 100w" sizes="auto, (max-width: 483px) 100vw, 483px" /></a></p>
<h2>Alternative options</h2>
<p>I had to try a few times to make OpenSSH work for me. But if it doesn&#8217;t work out for you, there are a few other options you can try to use as well.</p>
<ul>
<li><a href="http://www.coreftp.com/server/">CoreFTP</a></li>
<li><a href="https://www.bitvise.com/ssh-server">BitVise SSH Server</a></li>
<li><a href="http://www.freesshd.com/">freeSSHd and freeFTPd</a></li>
</ul>
<h2>Resources</h2>
<p><a href="https://winscp.net/eng/docs/guide_windows_openssh_server">Installation Guide</a> on WinSCP</p>The post <a href="https://www.kjctech.net/setting-up-sftp-or-ssh-server-on-windows-server-2012-r2/">Setting Up SFTP or SSH Server on Windows Server 2012 R2</a> first appeared on <a href="https://www.kjctech.net">KC's Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://www.kjctech.net/setting-up-sftp-or-ssh-server-on-windows-server-2012-r2/feed/</wfw:commentRss>
			<slash:comments>27</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3670</post-id>	</item>
	</channel>
</rss>
