| [=] |
| Articles I can't help it. I must use Windows and Linux. Preferably at the same time. I like to use Windows for my creative work but I like the Linux toolset. And the most important part is that every machine runs a SSH daemon. With Windows 7 (and Vista but I skipped that), Microsoft has finally implemented their commercial "Subsystem for UNIX-based Applications" (formerly known as "Windows Services for UNIX") package together with Windows, which means that it's probably nice and integrated and all. However, the marketing department decided it was only for the Windows 7 Enterprise and Ultimate Editions. And goddamn €160 was not enough for that. I've got Professional. No jaddah unix something. If I can't use it I don't want to know about it. Luckily, that awesome alternative by Red Hat called Cygwin is already fully compatible with Windows 7. The site is pretty lame but Cygwin is awesome. How to set up an SSH DAEMON using CYGWIN in Windows 7 You need to be root- err... an Administrator. Duh! The tools that make you master your multi-computer environment in the toughest of times are ssh + daemon and rsync. So make sure you also mark the openssh package for installation together with whatever you need during installation. After the installation, press [Win] + [Pause] for System Information. Click Advanced system settings and click on Environment Variables... ![]() Add a new system variable called CYGWIN and set the value to: 'ntsec tty' (without qoutes). Remember this value, it will be asked during sshd setup! Edit the PATH variable and append ;D:\Common\Cygwin or ofcourse whatever you installed Cygwin to. Mine looks like this: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;D:\Common\Cygwin\bin Now press [Win] and enter cygwin to start a bash shell. Enter ssh-host-config and choose the defaults for every question. Remember your password. I recommend you use your login password. This will be your ssh password. Don't be stupid about it, or the whole world will out-clever you into your computer. Ofcourse you have a proper firewalled router and you'll need to forward ssh port 22 to your internal ip for true remote access. Enter exit, press [Win] and enter ash to start an ash shell. I don't know why you need an ash shell for this but you do. Ash-compatible scripts, apparently. First enter rebaseall to purge all your Cygwin permissions, and then enter net start sshd to start the ssh daemon (and add it as a service to Windows, you can check it out in services.msc). Try it out. It works! For now. After a reboot, suddenly, you cannot connect anymore, even though sshd is working. Connect from a different ssh client and the error message will tell you if there's no ssh daemon running. ssh: connect to host x.x.x.x port 22: No route to host (means no sshd) ssh: connect to host x.x.x.x port 22: Connection closed by remote host (means yes sshd!) ssh: connect to host x.x.x.x port 22: Connection timed out (means maybe, do you have a firewall running?) Your sshd has probably entered paranoid mode. Maybe because it realised your password was kind of weak. Here's how you fix it. Press [Win] and enter bash to start a bash shell again. (The difference with entering cygwin is that cygwin is actually a script that passes some options to bash for fancy coloring and stuff.) Edit your hosts.allow file: nano /etc/hosts.allow Put a # in front of the paranoya part like so: #ALL : PARANOID : deny and press [Ctrl] + [x], [y], [enter] EOF ![]() |
![]() | ||||||