DokanSSHFS for 64-bit Windows Vista and 7
I was having problems getting DokanSSHFS to work on my new 64-bit installation of Windows 7. The following post seems to be the answer to my prayers.
Comment #2 on issue 103 by psarena: sshfs appears to fail on Windows 7 x86_64 (ultimate)
http://code.google.com/p/dokan/issues/detail?id=103
As discovered in Issue 43: To get SSHFS working under Windows 7 x64 (64-bit), you
need to modify the currently available DokanSSHFS.exe (dokan-sshfs-0.2.0.1226
2008/12/11) to force it to run in 32-bit mode. Then it works.
This can be done with a Microsoft tool "Microsoft Common Language Runtime Agnostic
Assembly Conversion Tool" aka CorFlags.exe (68928 bytes, 2009-07-14 23:39:22, SHA-1:
1C4BF478E42F53B0ACDBD54EDD88E693CB9CAEE9) that's distributed as part of the .NET
Development Tools. As of this writing, the latest release is "Microsoft Windows SDK
for Windows 7 and .NET Framework 3.5 SP1" at
http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&displaylang=en
. That small web stub installer lets you pick which components from the huge package
to download/install. As mdhuntley said in comment 8: Uncheck everything except ".NET
Development Tools" (Developer Tools -> Windows Development Tools -> .NET Development
Tools) and install.
So after installing Dokan library (dokan-0.4.0.1223 x64 2008/12/19) and Dokan SSHFS
(dokan-sshfs-0.2.0.1226 2008/12/11) set the 32BIT flag on DokanSSHFS.exe with:
%ProgramFiles%\Microsoft SDKs\Windows\v7.0\Bin\CorFlags.exe
"%ProgramFiles(x86)%\Dokan\DokanSSHFS\DokanSSHFS.exe" /32BIT+
Mounting remote filesystems via SSHFS on Windows 7 x64. Sweet!
[http://code.google.com/p/dokan/issues/detail?id=103]
Update:
After tinkering around I could not make the above commands work for some reason. Maybe because I've been in Linux land for too long or maybe just the 64-bit OS throwing me for a loop. Either way I got it to work by copying C:\Program Files (x86)\Dokan\DokanSSHFS\DokanSSHFS.exe to C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\ and typing in the command corflags dokansshfs.exe /32BIT+. Then I copied dokansshfs.exe back to its original location and it actually works! I can once again remotely and securely mount the directories from my server on my laptop. This was one of my major Windows 7 complaints that is now fixed.
Tutorial: fail2ban
Unban a user:
sudo iptables -L
Look at the chain. e.g.: fail2ban-ssh
Notice the IP address to unban and count the line number that it appears under the chain.
e.g.:
Chain fail2ban-ssh (1 references)
target prot opt source destination
DROP 0 -- 61.236.117.xxx anywhere
DROP 0 -- 61.236.117.yyy anywhere
RETURN 0 -- anywhere anywhere
If you want to unban user 61.236.117.xxx use:
iptables -D fail2ban-ssh 1
If you want to unban user 61.236.117.yyy use:
iptables -D fail2ban-ssh 2