分享

SSH into a Windows computer | Mad Rants

 jedoc 2013-11-27

So you’re cruising along in Linux, happily using SSH to tunnel into every server you have access to, and suddenly you realize you need to get a file on your Windows computer. Sure, you could set up a remote desktop client like LogMeIn or GoToMyPC, but it’s just so simple to use SSH. But Windows only has telnet, which is not only disabled by default but horribly insecure to boot.

The solution is simple: Cygwin.

Cygwin provides access to a plethora tools you might find on your average Linux system, including an SSH server and related tools. I won’t go into the gory details of getting it up and running, as Gina Trapani of Lifehacker fame has already written a wonderful tutorial on this very topic. It’s an old article (from 2006), but it should still be accurate as far as all the steps go.

One thing you may notice if you’re running Windows Vista or Windows 7 is the addition of a mysterious user account called Privileged Server on your login screen. When SSH was being set up in Cygwin, a separate user was created for the SSH server, presumably so you couldn’t muck up too much on your own account when tunneling into your computer. It’s supposed to be there, but it may be kind of annoying to have a user account you’re never going to directly access taking up space on your login page. This can be fixed using the registry, but don’t edit it if you’re not entirely sure what you’re doing. Screwing up the registry can potentially result in irreparable damage to your Windows installation, computer hardware, and personal relationships. Yes, it’s that powerful. (I’m kidding.)

First things first, open up regedit via either the search box in the Start menu or the Run dialog. Once it’s open, navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\CurrentVersion\Winlogon. Right-click on Winlogon in the tree directory (left panel) and select New>Key. Type SpecialAccounts in the box that appears and hit Enter. Again in the tree directory, right-click on SpecialAccounts and create a new key titled UserList. (Note: these keys may already exist. In that case, simply click to enter them.)

Now, in UserList, right-click in the right panel and select New>DWORD (32-bit) Value. Name it cyg_server. (Note: I believe this is the account name, but you can double-check by right-clicking on My Computer, selecting Properties, then Advanced Properties, and clicking the Settings button under User Profiles. There may be a number of profiles there other than your personal account, but the SSH server likely has cyg somewhere in the name.)

Double-clicking on the value name will allow you to modify the data contained within. The default of 0 hides the account from the login screen, but you can show it again by changing that to 1.

Now you can exit out of regedit and log out or restart your computer to see the login screen sans Privileged Server! Congratulations, you are now a computer wizard. You may now put on your robe and hat.

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多