<?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>Windows &#8211; 编程技术记录</title>
	<atom:link href="https://blog.z6z8.cn/tag/windows/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.z6z8.cn</link>
	<description>世界你好!</description>
	<lastBuildDate>Sat, 21 Sep 2019 02:49:16 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>
	<item>
		<title>Windows10：配置Visual Studio Code 以SSH方式访问远程主机</title>
		<link>https://blog.z6z8.cn/2019/09/21/windows10%ef%bc%9a%e9%85%8d%e7%bd%aevisual-studio-code-%e4%bb%a5ssh%e6%96%b9%e5%bc%8f%e8%ae%bf%e9%97%ae%e8%bf%9c%e7%a8%8b%e4%b8%bb%e6%9c%ba/</link>
		
		<dc:creator><![CDATA[holdsky]]></dc:creator>
		<pubDate>Sat, 21 Sep 2019 02:49:16 +0000</pubDate>
				<category><![CDATA[安全运维]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Visual Studio Code]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">http://139.155.43.7:8000/?p=348</guid>

					<description><![CDATA[Windows10上遇到过ssh的坑，记录下过程 参考 https://code.visualstudio.c [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Windows10上遇到过ssh的坑，记录下过程</p>
<p>参考 <a href="https://code.visualstudio.com/docs/remote/troubleshooting#_installing-a-supported-ssh-client">https://code.visualstudio.com/docs/remote/troubleshooting#_installing-a-supported-ssh-client</a></p>
<h1>环境和知识准备</h1>
<ul>
<li>远程主机，并开启ssh-server服务（通常端口22）</li>
<li>Windows环境（本文Windwos10家庭版）</li>
<li>Visual Studio Code</li>
<li>公钥加密算法，对SSH，通常为RSA</li>
<li>已经生成好的ssh公钥文件和私有文件</li>
</ul>
<h1>步骤</h1>
<h2>安装ssh-client</h2>
<p>对于Windows10的一些版本，可以通过<code>设置--系统--应用和功能--管理可选功能--添加功能</code>来开启ssh-client，奈何本穷的Windows10不支持。</p>
<p>还有两种方法来安装ssh-client</p>
<p>通过PowerShell安装，以管理员方式启动PowerShell，具体参考<a href="https://docs.microsoft.com/zh-cn/windows-server/administration/openssh/openssh_install_firstuse" title="这里">这里</a>，反正本穷是没有成功。</p>
<p>于是，只有通过安装Git for Windows来安装ssh-client了，<a href="https://git-scm.com/download/win" title="下载地址">下载地址</a></p>
<h2>安装RemoteSSH</h2>
<p>这里需要给Visual Studio Code 安装扩展包，以支持RemoteSSH。<code>Visual Studio Code -- 查看 --扩展</code>,在扩展中搜索<code>Remote Development</code>，然后安装这个扩展包，会自动安装相关依赖包。</p>
<h2>配置Vistual Studio Code SSH</h2>
<p><code>Visual Studio Code -- 设置</code>，搜索SSH，在结果列表中找到<code>扩展--Remote-SSH -- Remote.SSH:Config File</code>，自定义RemoteSSH的配置文件路径，然后创建这个配置文件，内容如下:</p>
<pre><code>Host 自定义别名
    User 远程主机ssh登陆的用户名
    HostName 远程主机名字，可以是ip地址
    Port 远程主机ssh端口号，一般是22
    IdentityFile 身份验证文件路径，即ssh私钥文件路径</code></pre>
<h2>访问</h2>
<p>Vistual Studio Code -- 查看 --命令面板 --Remote-SSH：Connect ToHost</p>
<p>选择配置文件中配置好的主机即可。</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
