{"id":20470,"date":"2020-01-30T12:42:20","date_gmt":"2020-01-30T04:42:20","guid":{"rendered":"http:\/\/4563.org\/?p=20470"},"modified":"2020-01-30T12:42:20","modified_gmt":"2020-01-30T04:42:20","slug":"virmach-%e5%ae%89%e8%a3%85-windows-%e5%bc%80%e5%90%af-ssh","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=20470","title":{"rendered":"Virmach \u5b89\u88c5 Windows \u5f00\u542f SSH"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>zxxx<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-12 10:12:36\t<\/p>\n<h3>Virmach \u5b89\u88c5 Windows \u5f00\u542f SSH<\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 zxxx \u4e8e 2019-12-12 19:05 \u7f16\u8f91 <\/p>\n<p> \u5b89\u88c5 Windows 2012 R2<\/p>\n<p>  1. \u53d1\u5de5\u5355\u91cd\u65b0\u5b89\u88c5 Windows \u7cfb\u7edf\uff1a\u63d0\u4f9b IP \u548c \u673a\u623f\u4f4d\u7f6e\u3002<br \/>  2. \u901a\u8fc7\u63a7\u5236\u9762\u677f\u4f7f\u7528 VNC \u8fde\u63a5\uff0c\u8bbe\u7f6e Administrator \u5bc6\u7801\u3002<br \/>  3. \u4f7f\u7528\u8fdc\u7a0b\u684c\u9762\u8fde\u63a5\uff0c\u914d\u7f6e\u533a\u57df\uff0c\u8bed\u8a00\uff0c\u66f4\u65b0\u7cfb\u7edf\u3002<\/p>\n<p>  \u4e0b\u8f7d SSH \u6587\u4ef6<\/p>\n<p>  https:\/\/github.com\/PowerShell\/Win32-OpenSSH\/releases\/download\/v8.0.0.0p1-Beta\/OpenSSH-Win64.zip<\/p>\n<p>  \u89e3\u538b SSH \u6587\u4ef6<\/p>\n<p>  C:Program FilesOpenSSH<\/p>\n<p>  https:\/\/i.loli.net\/2019\/12\/12\/aiUtYwmqA1ePS8h.png<\/p>\n<p>  \u4fee\u6539\u7cfb\u7edf\u73af\u5883\u53d8\u91cf PATH <\/p>\n<p>  \u6dfb\u52a0 C:Program FilesOpenSSH<\/p>\n<p>  https:\/\/i.loli.net\/2019\/12\/12\/KPcqZU3wrHtEgbD.png<\/p>\n<p>  \u5b89\u88c5 SSH<\/p>\n<p>  \u7528\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u201c\u547d\u4ee4\u63d0\u793a\u7b26\u201d<\/p>\n<p>  https:\/\/i.loli.net\/2019\/12\/12\/dhWxoqZjmLiACYU.png<\/p>\n<p>  C:Program FilesOpenSSH&gt;powershell.exe -ExecutionPolicy Bypass -File install-sshd.ps1<br \/>   SetServiceObjectSecurity SUCCESS<br \/>   ChangeServiceConfig2 SUCCESS<br \/>   ChangeServiceConfig2 SUCCESS<br \/>  sshd and ssh-agent services successfully installed<\/p>\n<p>  \u751f\u6210\u4e3b\u673a\u5bc6\u94a5<\/p>\n<p>  C:Program FilesOpenSSH&gt; mkdir C:ProgramDatassh<\/p>\n<p>  C:Program FilesOpenSSH&gt;ssh-keygen.exe -A<br \/>  ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519<\/p>\n<p>  \u4fee\u590d\u6743\u9650<\/p>\n<p>  C:Program FilesOpenSSH&gt; Powershell.exe -ExecutionPolicy Bypass -Command &quot;. .FixUserFilePermissions.ps1 -Confirm:$false&quot;<br \/>  &nbsp; &nbsp;Done.<\/p>\n<p>  C:Program FilesOpenSSH&gt; Powershell.exe -ExecutionPolicy Bypass -Command &quot;. .FixHostFilePermissions.ps1 -Confirm:$false&quot;<br \/>  [*] C:ProgramDatasshsshd_config<br \/>  Inheritance is removed from &#8216;C:ProgramDatasshsshd_config&#8217;.<br \/>  &#8216;BUILTINUsers&#8217; has no more access to &#8216;C:ProgramDatasshsshd_config&#8217;.<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;Repaired permissions<\/p>\n<p>  [*] C:ProgramDatasshssh_host_dsa_key<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;looks good<\/p>\n<p>  [*] C:ProgramDatasshssh_host_dsa_key.pub<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;looks good<\/p>\n<p>  [*] C:ProgramDatasshssh_host_ecdsa_key<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;looks good<\/p>\n<p>  [*] C:ProgramDatasshssh_host_ecdsa_key.pub<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;looks good<\/p>\n<p>  [*] C:ProgramDatasshssh_host_ed25519_key<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;looks good<\/p>\n<p>  [*] C:ProgramDatasshssh_host_ed25519_key.pub<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;looks good<\/p>\n<p>  [*] C:ProgramDatasshssh_host_rsa_key<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;looks good<\/p>\n<p>  [*] C:ProgramDatasshssh_host_rsa_key.pub<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;looks good<\/p>\n<p>  \u542f\u52a8 PowerShell <\/p>\n<p>  C:Program FilesOpenSSH&gt;powershell<br \/>  Windows PowerShell<br \/>  Copyright (C) 2014 Microsoft Corporation. All rights reserved.<br \/>  \u914d\u7f6e\u9632\u706b\u5899<\/p>\n<p>  PS C:Program FilesOpenSSH&gt; New-NetFirewallRule -Name sshd -DisplayName &#8216;OpenSSH SSH Server&#8217; -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22<\/p>\n<p>  Name&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;: sshd<br \/>  DisplayName&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;: OpenSSH SSH Server<br \/>  Description&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;:<br \/>  DisplayGroup&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; :<br \/>  Group&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;:<br \/>  Enabled&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;: True<br \/>  Profile&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;: Any<br \/>  Platform&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;: {}<br \/>  Direction&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; : Inbound<br \/>  Action&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; : Allow<br \/>  EdgeTraversalPolicy&nbsp; &nbsp;: Block<br \/>  LooseSourceMapping&nbsp; &nbsp; : False<br \/>  LocalOnlyMapping&nbsp; &nbsp;&nbsp; &nbsp;: False<br \/>  Owner&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;:<br \/>  PrimaryStatus&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;: OK<br \/>  Status&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; : The rule was parsed successfully from the store. (65536)<br \/>  EnforcementStatus&nbsp; &nbsp;: NotApplicable<br \/>  PolicyStoreSource&nbsp; &nbsp;: PersistentStore<br \/>  PolicyStoreSourceType : Local<\/p>\n<p>  https:\/\/i.loli.net\/2019\/12\/12\/3den1aRulKmwpIE.png<\/p>\n<p>  \u914d\u7f6e\u5e76\u542f\u52a8 SSH \u670d\u52a1<\/p>\n<p>  PS C:Program FilesOpenSSH&gt; Set-Service -Name sshd -StartupType &quot;Automatic&quot;<br \/>  PS C:Program FilesOpenSSH&gt; Start-Service sshd<\/p>\n<p>  https:\/\/i.loli.net\/2019\/12\/12\/EOGL6WXjo7JpFd3.png<\/p>\n<p>  \u901a\u8fc7\u201c\u53e3\u4ee4\u9a8c\u8bc1\u201d\u8fde\u63a5<\/p>\n<p>  https:\/\/i.loli.net\/2019\/12\/12\/lywdH72vZ6Eejrk.png<\/p>\n<p>  Microsoft Windows &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;<br \/>  (c) 2013 Microsoft Corporation. All rights reserved.<br \/>  administrator@WINDOWS C:UsersAdministrator&gt; <\/p>\n<p>  https:\/\/i.loli.net\/2019\/12\/12\/XCqgksVWZhxcv8E.png  \t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>6531306<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-12 13:12:36\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u6ca1\u6709 windows\u9009\u9879\u7684 \u53ef\u4ee5\u53d1\u5de5\u5355 \u8981\u6c42\u6539windows\uff1f\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>zzk<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-12 14:46:08\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5927\u4f6c\u8fd9\u4e2a\u601d\u8def\u597d\uff0c\u8fd9\u6837\u907f\u514d\u88ab\u67e5\uff0c\u723d\u6b6a\u6b6a\uff01\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>zxxx<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-12 10:14:05\t<\/p>\n<h3><\/h3>\n<p>  \t\tSSH \u914d\u7f6e\u6587\u4ef6 <\/p>\n<p>  %PROGRAMDATA%sshsshd_config<\/p>\n<p>  C:ProgramDatasshsshd_config<\/p>\n<p>  # This is the sshd server system-wide configuration file.See<br \/>  # sshd_config(5) for more information.<\/p>\n<p>  # The strategy used for options in the default sshd_config shipped with<br \/>  # OpenSSH is to specify options with their default value where<br \/>  # possible, but leave them commented.Uncommented options override the<br \/>  # default value.<\/p>\n<p>  #Port 22<br \/>  #AddressFamily any<br \/>  #ListenAddress 0.0.0.0<br \/>  #ListenAddress ::<\/p>\n<p>  #HostKey __PROGRAMDATA__\/ssh\/ssh_host_rsa_key<br \/>  #HostKey __PROGRAMDATA__\/ssh\/ssh_host_dsa_key<br \/>  #HostKey __PROGRAMDATA__\/ssh\/ssh_host_ecdsa_key<br \/>  #HostKey __PROGRAMDATA__\/ssh\/ssh_host_ed25519_key<\/p>\n<p>  # Ciphers and keying<br \/>  #RekeyLimit default none<\/p>\n<p>  # Logging<br \/>  #SyslogFacility AUTH<br \/>  #LogLevel INFO<\/p>\n<p>  # Authentication:<\/p>\n<p>  #LoginGraceTime 2m<br \/>  #PermitRootLogin prohibit-password<br \/>  #StrictModes yes<br \/>  #MaxAuthTries 6<br \/>  #MaxSessions 10<\/p>\n<p>  #PubkeyAuthentication yes<\/p>\n<p>  # The default is to check both .ssh\/authorized_keys and .ssh\/authorized_keys2<br \/>  # but this is overridden so installations will only check .ssh\/authorized_keys<br \/>  AuthorizedKeysFile.ssh\/authorized_keys<\/p>\n<p>  #AuthorizedPrincipalsFile none<\/p>\n<p>  # For this to work you will also need host keys in %programData%\/ssh\/ssh_known_hosts<br \/>  #HostbasedAuthentication no<br \/>  # Change to yes if you don&#8217;t trust ~\/.ssh\/known_hosts for<br \/>  # HostbasedAuthentication<br \/>  #IgnoreUserKnownHosts no<br \/>  # Don&#8217;t read the user&#8217;s ~\/.rhosts and ~\/.shosts files<br \/>  #IgnoreRhosts yes<\/p>\n<p>  # To disable tunneled clear text passwords, change to no here!<br \/>  #PasswordAuthentication yes<br \/>  #PermitEmptyPasswords no<\/p>\n<p>  # GSSAPI options<br \/>  #GSSAPIAuthentication no<\/p>\n<p>  #AllowAgentForwarding yes<br \/>  #AllowTcpForwarding yes<br \/>  #GatewayPorts no<br \/>  #PermitTTY yes<br \/>  #PrintMotd yes<br \/>  #PrintLastLog yes<br \/>  #TCPKeepAlive yes<br \/>  #UseLogin no<br \/>  #PermitUserEnvironment no<br \/>  #ClientAliveInterval 0<br \/>  #ClientAliveCountMax 3<br \/>  #UseDNS no<br \/>  #PidFile \/var\/run\/sshd.pid<br \/>  #MaxStartups 10:30:100<br \/>  #PermitTunnel no<br \/>  #ChrootDirectory none<br \/>  #VersionAddendum none<\/p>\n<p>  # no default banner path<br \/>  #Banner none<\/p>\n<p>  # override default of no subsystems<br \/>  Subsystem sftpsftp-server.exe<\/p>\n<p>  # Example of overriding settings on a per-user basis<br \/>  #Match User anoncvs<br \/>  # AllowTcpForwarding no<br \/>  # PermitTTY no<br \/>  # ForceCommand cvs server<\/p>\n<p>  Match Group administrators<br \/>  &nbsp; &nbsp;&nbsp; &nbsp; AuthorizedKeysFile __PROGRAMDATA__\/ssh\/administrators_authorized_keys  \t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>ccf<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-12 10:14:09\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u6ca1\u5fc5\u8981\u5427\uff0c\u5546\u5bb6\u771f\u8981\u67e5\u4e5f\u4e0d\u662f\u626b\u63cf22\u7684&#8230;\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>lastfree<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-12 10:14:25\t<\/p>\n<h3><\/h3>\n<p>  \t\t:lol<br \/>  \u5927\u4f6c\u4f1a\u73a9\u3002ZSBD\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>zxxx<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-12 10:17:12\t<\/p>\n<h3><\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 zxxx \u4e8e 2019-12-13 00:33 \u7f16\u8f91 <\/p>\n<p> \u751f\u6210\u5bc6\u94a5\u5bf9<\/p>\n<p>  \u4fdd\u5b58\u5728 C:UsersAdministrator\/.ssh\/ \u6587\u4ef6\u5939<\/p>\n<p>  administrator@WINDOWS C:UsersAdministrator&gt;ssh-keygen -t rsa -b 4096<br \/>  Generating public\/private rsa key pair.<br \/>  Enter file in which to save the key (C:UsersAdministrator\/.ssh\/id_rsa):<br \/>  Enter passphrase (empty for no passphrase):<br \/>  Enter same passphrase again:<br \/>  Your identification has been saved in C:UsersAdministrator\/.ssh\/id_rsa.<br \/>  Your public key has been saved in C:UsersAdministrator\/.ssh\/id_rsa.pub.<br \/>  The key fingerprint is:<br \/>  SHA256:lrzGP92rQ\/3CXwI60m4c8Iq+PD37UiT5qO2sU7GD8u0 administrator@Windows<br \/>  The key&#8217;s randomart image is:<br \/>  +&#8212;&#8212;-+<br \/>  |&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;|<br \/>  |&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;|<br \/>  |&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;.&nbsp; &nbsp;&nbsp; &nbsp; |<br \/>  |&nbsp; &nbsp;&nbsp; &nbsp; .=..&nbsp; &nbsp;&nbsp; &nbsp;|<br \/>  |&nbsp; &nbsp;&nbsp; &nbsp; .SX..&nbsp; &nbsp;|<br \/>  |&nbsp; &nbsp; . .o=o=&#8230;.|<br \/>  |&nbsp; &nbsp;o B==++ o&#8230;|<br \/>  |&nbsp; &nbsp;.*oB++.o +.o|<br \/>  |&nbsp; &nbsp;.=BE*+..o.+.|<br \/>  +&#8212;&#8212;&#8212;+<\/p>\n<p>  administrator@WINDOWS C:UsersAdministrator&gt;dir .ssh<br \/>   Volume in drive C has no label.<br \/>   Volume Serial Number is 6CCF-4599<\/p>\n<p>   Directory of C:UsersAdministrator.ssh<\/p>\n<p>  12\/12\/201912:43 AM&nbsp; &nbsp; &lt;DIR&gt;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; .<br \/>  12\/12\/201912:43 AM&nbsp; &nbsp; &lt;DIR&gt;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; ..<br \/>  12\/11\/201911:48 PM&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 3,389 id_rsa<br \/>  12\/11\/201911:48 PM&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;748 id_rsa.pub<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;3 File(s)&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 7,526 bytes<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;2 Dir(s)52,833,697,792 bytes free<\/p>\n<p>  \u8fde\u63a5 SFTP\uff0c\u4e0b\u8f7d\u5bc6\u94a5\u5bf9<\/p>\n<p>  \u65b0\u5efa\u6587\u4ef6\u5939 Z:.ssh \u3010\u8f93\u5165 .ssh. \u3011<\/p>\n<p>  https:\/\/www.hostloc.com\/forum.php?mod=attachment&amp;aid=MTI5MTM5fGYyNDU1NWU2fDE1NzYxNDI2NDF8NDExNDZ8NjIxNDU5&amp;noupdate=yes<\/p>\n<p>  sftp&gt; lcd z:.ssh<br \/>  sftp&gt;get ~\/.ssh\/*<br \/>  Downloading id_rsa from \/C:\/Users\/Administrator\/.ssh\/id_rsa<br \/>  100% 3KB&nbsp; &nbsp;&nbsp; &nbsp;3KB\/s 00:00:01<br \/>  \/C:\/Users\/Administrator\/.ssh\/id_rsa: 3389 bytes transferred in 1 seconds (3389 bytes\/s)<br \/>  Downloading id_rsa.pub from \/C:\/Users\/Administrator\/.ssh\/id_rsa.pub<br \/>  100% 748 bytes&nbsp; &nbsp; 748 bytes\/s 00:00:01<br \/>  \/C:\/Users\/Administrator\/.ssh\/id_rsa.pub: 748 bytes transferred in 1 seconds (748 bytes\/s)<\/p>\n<p>  \u5220\u9664\u5bc6\u94a5\u5bf9<\/p>\n<p>  sftp&gt; rm ~\/.ssh\/id_rsa*<br \/>  Removing \/C:\/Users\/Administrator\/.ssh\/id_rsa<br \/>  Removing \/C:\/Users\/Administrator\/.ssh\/id_rsa.pub<br \/>  sftp&gt;<\/p>\n<p>  \u4f7f\u7528 PuTTY Key Generator \u8f6c\u6362\u79c1\u94a5\u6dfb\u52a0\u53e3\u4ee4\uff0c\u4fdd\u5b58 authorized_keys<\/p>\n<p>  https:\/\/www.hostloc.com\/forum.php?mod=attachment&amp;aid=MTI5MTQxfGJmMTM2MGIxfDE1NzYxNjgwMzV8NDExNDZ8NjIxNDU5&amp;noupdate=yes<\/p>\n<p>  https:\/\/www.hostloc.com\/forum.php?mod=attachment&amp;aid=MTI5MzE1fDQyNDA3MzAwfDE1NzYxNjgwMzV8NDExNDZ8NjIxNDU5&amp;noupdate=yes<\/p>\n<p>  https:\/\/www.hostloc.com\/forum.php?mod=attachment&amp;aid=MTI5MTQyfGEzNDIwZWM3fDE1NzYxNjgwMzV8NDExNDZ8NjIxNDU5&amp;noupdate=yes<\/p>\n<p>  https:\/\/www.hostloc.com\/forum.php?mod=attachment&amp;aid=MTI5MTQzfDNiYzdkNGJkfDE1NzYxNjgwMzV8NDExNDZ8NjIxNDU5&amp;noupdate=yes<\/p>\n<p>  https:\/\/www.hostloc.com\/forum.php?mod=attachment&amp;aid=MTI5MTQ0fDljODlkMTA1fDE1NzYxNjgwMzV8NDExNDZ8NjIxNDU5&amp;noupdate=yes<\/p>\n<p>  https:\/\/www.hostloc.com\/forum.php?<br \/>  mod=attachment&amp;aid=MTI5MzE2fDg4OWNlYzc5fDE1NzYxNjgwMzV8NDExNDZ8NjIxNDU5&amp;noupdate=yes<\/p>\n<p>  https:\/\/www.hostloc.com\/forum.php?mod=attachment&amp;aid=MTI5MTQ1fDdjNWUyOGIxfDE1NzYxNjgwMzV8NDExNDZ8NjIxNDU5&amp;noupdate=yes<\/p>\n<p>  \u65b0\u5efa\u6587\u4ef6 C:UsersAdministrator.sshauthorized_keys \u5185\u5bb9\u4e3a<\/p>\n<p>  ssh-rsa AAAAB3NzaC1yc2EAA&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.QZ3WIHkbtIaQ==<\/p>\n<p>  \u4fee\u6539 sshd_config \u6587\u4ef6<\/p>\n<p>  \u53bb\u6389 #PubkeyAuthentication yes \u524d\u9762\u7684 # \u53d8\u4e3a<\/p>\n<p>  PubkeyAuthentication yes<\/p>\n<p>  \u5c06\u6700\u540e\u4e24\u4e2a\u6ce8\u91ca<\/p>\n<p>  #Match Group administrators<br \/>  #&nbsp; &nbsp;&nbsp; &nbsp; AuthorizedKeysFile __PROGRAMDATA__\/ssh\/administrators_authorized_keys<\/p>\n<p>  https:\/\/i.loli.net\/2019\/12\/12\/eUnuYdAwWBLOtyi.png<\/p>\n<p>  \u91cd\u65b0\u542f\u52a8 SSH \u670d\u52a1<br \/>  PS C:Program FilesOpenSSH&gt; Restart-Service -Name sshd, ssh-agent -Force<\/p>\n<p>  \u73b0\u5728\u53ef\u4ee5\u4f7f\u7528SSH\u5bc6\u94a5\u767b\u5f55\u8fde\u63a5\u4e86<\/p>\n<p>  # This is the sshd server system-wide configuration file.See<br \/>  # sshd_config(5) for more information.<\/p>\n<p>  # The strategy used for options in the default sshd_config shipped with<br \/>  # OpenSSH is to specify options with their default value where<br \/>  # possible, but leave them commented.Uncommented options override the<br \/>  # default value.<\/p>\n<p>  #Port 22<br \/>  #AddressFamily any<br \/>  #ListenAddress 0.0.0.0<br \/>  #ListenAddress ::<\/p>\n<p>  #HostKey __PROGRAMDATA__\/ssh\/ssh_host_rsa_key<br \/>  #HostKey __PROGRAMDATA__\/ssh\/ssh_host_dsa_key<br \/>  #HostKey __PROGRAMDATA__\/ssh\/ssh_host_ecdsa_key<br \/>  #HostKey __PROGRAMDATA__\/ssh\/ssh_host_ed25519_key<\/p>\n<p>  # Ciphers and keying<br \/>  #RekeyLimit default none<\/p>\n<p>  # Logging<br \/>  #SyslogFacility AUTH<br \/>  #LogLevel INFO<\/p>\n<p>  # Authentication:<\/p>\n<p>  #LoginGraceTime 2m<br \/>  #PermitRootLogin prohibit-password<br \/>  #StrictModes yes<br \/>  #MaxAuthTries 6<br \/>  #MaxSessions 10<\/p>\n<p>  PubkeyAuthentication yes<\/p>\n<p>  # The default is to check both .ssh\/authorized_keys and .ssh\/authorized_keys2<br \/>  # but this is overridden so installations will only check .ssh\/authorized_keys<br \/>  AuthorizedKeysFile&nbsp; &nbsp; &nbsp; &nbsp; .ssh\/authorized_keys<\/p>\n<p>  #AuthorizedPrincipalsFile none<\/p>\n<p>  # For this to work you will also need host keys in %programData%\/ssh\/ssh_known_hosts<br \/>  #HostbasedAuthentication no<br \/>  # Change to yes if you don&#8217;t trust ~\/.ssh\/known_hosts for<br \/>  # HostbasedAuthentication<br \/>  #IgnoreUserKnownHosts no<br \/>  # Don&#8217;t read the user&#8217;s ~\/.rhosts and ~\/.shosts files<br \/>  #IgnoreRhosts yes<\/p>\n<p>  # To disable tunneled clear text passwords, change to no here!<br \/>  #PasswordAuthentication yes<br \/>  #PermitEmptyPasswords no<\/p>\n<p>  # GSSAPI options<br \/>  #GSSAPIAuthentication no<\/p>\n<p>  #AllowAgentForwarding yes<br \/>  #AllowTcpForwarding yes<br \/>  #GatewayPorts no<br \/>  #PermitTTY yes<br \/>  #PrintMotd yes<br \/>  #PrintLastLog yes<br \/>  #TCPKeepAlive yes<br \/>  #UseLogin no<br \/>  #PermitUserEnvironment no<br \/>  #ClientAliveInterval 0<br \/>  #ClientAliveCountMax 3<br \/>  #UseDNS no<br \/>  #PidFile \/var\/run\/sshd.pid<br \/>  #MaxStartups 10:30:100<br \/>  #PermitTunnel no<br \/>  #ChrootDirectory none<br \/>  #VersionAddendum none<\/p>\n<p>  # no default banner path<br \/>  #Banner none<\/p>\n<p>  # override default of no subsystems<br \/>  Subsystem&nbsp; &nbsp; &nbsp; &nbsp; sftp&nbsp; &nbsp; &nbsp; &nbsp; sftp-server.exe<\/p>\n<p>  # Example of overriding settings on a per-user basis<br \/>  #Match User anoncvs<br \/>  #&nbsp; &nbsp; &nbsp; &nbsp; AllowTcpForwarding no<br \/>  #&nbsp; &nbsp; &nbsp; &nbsp; PermitTTY no<br \/>  #&nbsp; &nbsp; &nbsp; &nbsp; ForceCommand cvs server<\/p>\n<p>  #Match Group administrators<br \/>  #&nbsp; &nbsp;&nbsp; &nbsp; AuthorizedKeysFile __PROGRAMDATA__\/ssh\/administrators_authorized_keys<\/p>\n<p>  \t\t\t\t\t<strong>voleta<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-12 10:19:17\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u4e0d\u5361\u5417\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>zxxx<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-12 10:23:11\t<\/p>\n<h3><\/h3>\n<p>  \t\tvoleta \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-12 10:19<br \/>  \u4e0d\u5361\u5417<\/p>\n<p> \u4f7f\u7528\u52a0\u901f\u5668\uff0c\u8fd8\u53ef\u4ee5\u63a5\u53d7\u3002\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>yeshang<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-12 13:15:41\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u88c5win\u53ef\u4ee5dd \u5f00ssh\u662f\u5e72\u561b\u5462\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>zxxx \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/20470"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=20470"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/20470\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=20470"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=20470"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=20470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}