fengye110 / dokan

Automatically exported from code.google.com/p/dokan
0 stars 0 forks source link

'failed to connect' in sshfs #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install Dokan library
2. Install Distributable C++ SP1
3. Install Dokan SSHFS
4. Create profile
5. Test connection using 'telnet xxx.xxx.xxx.xxx 22' - works
6. Test connection using Dokan SSHFS - 'failed to connect'

What is the expected output? What do you see instead?
Expected to connect and see mounted drive. Got 'failed to connect' instead.

What version of the product are you using? On what operating system?
0.1.9.1124
OS : WinXP SP3

Please provide any additional information below.
I'm using a private key file (generated using Puttygen), which works fine
in Putty.

Original issue reported on code.google.com by wimgoddenajax@gmail.com on 17 Oct 2008 at 4:46

GoogleCodeExporter commented 9 years ago
A key which is generated by putty doesn't work on DokanSSHFS. Please generate 
key 
file using OpenSSH.

Original comment by asa...@gmail.com on 17 Oct 2008 at 5:11

GoogleCodeExporter commented 9 years ago
PuTTYgen can export OpenSSH keys: Menu Conversions -> Export OpenSSH key... 
these 
work with DokanSSHFS

Original comment by mbi...@gmail.com on 19 Dec 2008 at 10:08

GoogleCodeExporter commented 9 years ago
I am getting the same error. I get the error regardless of using public/private 
keys,
or using password authentication. I have 4 machines that I can ssh to from my 
windows
PC in my local network along with 1 system outside my network. SSH works with 
both
putty and openssh on the windows computer to all of those machines, but Dokan 
SSHFS
continues to give the error message "failed to conenect" for every one of them. 
Is
there some way to get debugging or more detailed information when trying to
connection for better troubleshooting of this issue (perhaps options that can 
be used
on the command line)?

Original comment by matr...@gmail.com on 20 Mar 2009 at 11:39

GoogleCodeExporter commented 9 years ago
I have the same issue as matrixm. I can log in via openssh, tactia, and putty, 
but 
not through SSHFS

Original comment by doom777 on 2 Jul 2009 at 7:27

GoogleCodeExporter commented 9 years ago
I'm getting the same error trying to connect to a FreeNAS server using 
DokanSSHFS as 
the client.  PuTTY works ok.

Original comment by jxrid...@gmail.com on 19 Jan 2010 at 11:39

GoogleCodeExporter commented 9 years ago
I recently installed DokanSSHFS and am also getting the "failed to connect" 
error
message.

Original comment by kmai...@gmail.com on 14 Feb 2010 at 12:12

GoogleCodeExporter commented 9 years ago
dokan_sshfs_for_dokan-0.5.0
dokaninstall_051.exe
Windows with Dokan (WinXP SP2) - 192.168.1.28
Linux sshd OpenSSH_4.5p1, OpenSSL 0.9.8b 04 May 2006 - 192.168.1.30
Authorization by password OK.

By key id_dsa - Failed to connect.(Other ssh clients works, key is correct.)

After that when I tried to connect again, and check "What is key file I 
inserted" in the 
place where I must insert key - I see "openFileDialog1"

Server log :
Feb 25 20:39:21 localhost sshd[7447]: Received disconnect from 192.168.1.28: 3: 
Tamir.SharpSsh.jsch.JSchException: Auth cancel\r\n   at 
Tamir.SharpSsh.jsch.Session.connect(Int32 connectTimeout)

192.168.1.28 - is the addres of client PC WinXP SP2 whith Dokan

Original comment by pe...@pochtamt.ru on 25 Feb 2010 at 6:03

GoogleCodeExporter commented 9 years ago
Same issue here when using password, no keys in my configuration environment at 
this 
point. Has someone solved this issue?

Original comment by tamalo...@gmail.com on 18 Apr 2010 at 2:21

GoogleCodeExporter commented 9 years ago
I confirm the same on Windows 7. When using an OpenSSH generated, otherwise 
working dsa key, it fails to connect. It connects just fine with cleartext 
password authentication.

Original comment by develope...@gmail.com on 24 Oct 2010 at 8:15

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Even with the latest 0.6 release, it is still the same issue. I am using 
password authentication. I either get the "failed to connect" error or it 
crashes (get the "DokanSSHFS stopped working" dialog). Is it even known to work 
in any environment any more?

Original comment by harid...@gmail.com on 11 Jan 2011 at 9:09

GoogleCodeExporter commented 9 years ago
I have the same problem:

OS:
Win7 Home Premium 64bit

I already had installed:
- Microsoft .NET Framework 3.5

I installed:
- http://dokan-dev.net/wp-content/uploads/DokanInstall_0.6.0.exe
- 
http://www.microsoft.com/downloads/details.aspx?FamilyID=200b2fd9-ae1a-4a14-984d
-389c36f85647

First I tested my connection with putty. It worked. Then I created a private 
OpenSSH key with puttygen.exe. Then I ran DokanSSHFS.exe 
(http://dokan-dev.net/wp-content/uploads/DokanInstall_0.6.0.exe) and entered my 
information, selected my key and clicked the "Connect" button.

The only thing I get is: "failed to connect"

I also tried to run the program with -sd (debugging), and used DebugView  
(http://technet.microsoft.com/en-us/sysinternals/bb896647) to see what was 
outputted. Here is the result:

00000000    0.00000000  [3020] SSHFS: Tamir.SharpSsh.jsch.JSchException: 
System.Net.Sockets.SocketException: The requested name is valid, but no data of 
the requested type was found    
00000001    0.00000000  [3020]    at System.Net.Dns.InternalGetHostByName(String 
hostName, Boolean includeIPv6)  
00000002    0.00000000  [3020]    at System.Net.Dns.GetHostByName(String hostName)  
00000003    0.00000000  [3020]    at Tamir.SharpSsh.java.net.Socket..ctor(String 
host, Int32 port)   
00000004    0.00000000  [3020]    at Tamir.SharpSsh.jsch.Util.createSocket(String 
host, Int32 port, Int32 timeout)    
00000005    0.00000000  [3020]    at Tamir.SharpSsh.jsch.Session.connect(Int32 
connectTimeout)     
00000006    0.00000000  [3020]    at Tamir.SharpSsh.jsch.Session.connect()  
00000007    0.00000000  [3020]    at DokanSSHFS.SSHFS.SSHConnect()  

It's seems there is an exception, but I have no idea what the problem is. 
Anyone?

Original comment by trekste...@gmail.com on 18 Jan 2011 at 5:37

GoogleCodeExporter commented 9 years ago
I'm using Windows XP. Finally I get it work nicely! Here're my steps:
1. I downloaded Dokan SSHFS 0.6.0 
2. Program died with failure loading DDL. I realized I needed to install Dokan 
library.
3. Downloaded and installed. Rerun. Okay with password. Login with key failed 
with "fail to connect" dialog.
4. I read this post and tried to use PuTTYgen to export my private key (also 
PuTTYgen generated private key) into OpenSSH key
5. Connect with that new key and it works!

Thanks a lot.

Original comment by cych...@gmail.com on 13 Feb 2011 at 6:03

GoogleCodeExporter commented 9 years ago
I was able to solve the "unable to connect" problem when I noticed today that 
my software firewall - COMODO Firewall - was automatically blocking it.  COMODO 
Firewall apparently saw what Dokan SSHFS was trying to do as an "intrusion 
attempt", and blocked it accordingly.

I added Dokan SSHFS as a "trusted application", and got past the "unable to 
connect" problem... to have it crash >_>

Though this did not allow me to use Dokan SSHFS myself, I hope the information 
will be useful to others.

Original comment by b...@benmakesgames.com on 24 Mar 2011 at 9:14

GoogleCodeExporter commented 9 years ago

I used: dokan-0.6.0, dokan-sshfs-0.2.0.1226 + dokan-sshfs-0.6.0, Win XP 32 SP3
        as sshd: OpenSSH_5.8

It doesn't work with DSA 2048bit keys: "unable to connect"

But workes with 1024bit and 2048bit RSA keys

Original comment by aowber...@googlemail.com on 18 Apr 2011 at 10:43

GoogleCodeExporter commented 9 years ago
I had the "unable to connect" error, but I identified the bug:

the bug has to due with passphrases.

if you have no passphrase on the key file it works,
but if you add one you'll get fail to connect every time.

if some people got this to work with a passphrase then it must be certain 
characters in the passphrase that cause it not to open the key properly.
Guessing UTF-8/16 Japaneses and ASCII character encoding related issue...

only RSA works, but DSA is not as "safe" as RSA, so that is a good thing.

bits don't make a difference...

I made my key 4096 bit, and it works on a win 7/64-bit box.. 

workaround:
--------------
The "identity" or private key needs to be 
made with: 
openssh type RSA, didn't try puttygen... and don't care to.

ssh-keygen -t rsa -b 4096
---no passphrase--- critical
ssh-copy-id -i /home/user/.ssh/id_rsa.pub user@localhost

use winscp or sftp in putty via clear text password to get the 4 files in the 
.ssh folder

logout
log-in via terminal with RSA key 
or putty with imported key > change remote user password >
turn off sshd password authentication

Original comment by teknow...@gmail.com on 25 Apr 2011 at 7:01

GoogleCodeExporter commented 9 years ago
confirmed teknow's analysis above.  The use of a passphrase is an issue.  
  (see related issue #60 regarding clear-text passphrases anyway)

  I did not use PuTTYgen
  I did not use ssh-copy-id (although I will in the future, it simplifies the process)
  Disclaimer: key file that did not work was generated without '-b 4096' argument, so there is a little more than just a passphrase difference here.

1. install Dokan SSHFS 0.6.0
2. fire up CYGWIN and generate ssh keys - one with passphrase, one with out 
    [ ssh-keygen ]  (this used a passphrase and created id_rsa / id_rsa.pub
    [ ssh-keygen -t rsa -b 4096 -f ./.ssh/id_rsa2  ] no passphrase
3. in CYGWIN copy these 4 files to windows drive 
     [ cp /home/<username>/.ssh/id_rsa* /cygdrive/c/Users/<username>/.ssh/ ]

4. in CYGWIN scp both .pub files to remote server (id_rsa.pub & id_rsa2.pub)
     [ scp /home/<username>/.ssh/id_rsa*.pub user@remotehost: ]

5. add them to authorized keys on remote host
     [ssh user@remotehost
      cat ~/id_rsa.pub >> .ssh/authorized_keys
      cat ~/id_rsa2.pub >> .ssh/authorized_keys
     ]

6. using CYGWIN, test both keys with ssh
    [ssh -i /home/<user>/.ssh/id_rsa user@remotehost ] (prompted for passphrase)
      login successful
    [ssh -i /home/<user>/.ssh/id_rsa2 user@remotehost ] (no passphrase prompt)
      login successful

*** both ssh keys setup and confirmed working ***   

7. Fire up Dokan

8. Use key file with passphrase (id_rsa)  FAIL
     "Failed to connect" with provided passphrase
     "Failed to connect" with empty passphrase

9. Use key file without passphrase (id_rsa2) PASS
     Connect and mounted

Original comment by flip...@gmail.com on 29 Apr 2011 at 9:05

GoogleCodeExporter commented 9 years ago
I was getting the same error, but I was simply forgetting to run the program as 
administrator. Works great now (win7)

Original comment by tom...@gmail.com on 1 Oct 2011 at 11:57

GoogleCodeExporter commented 9 years ago
ani men to nefuguje

Original comment by brco...@gmail.com on 28 Aug 2013 at 2:20