iesmatauw / win-sshfs

Automatically exported from code.google.com/p/win-sshfs
0 stars 0 forks source link

Cannot connect to an EC2 instance. #46

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Attempt to log in using private key authentication
2.
3.

What is the expected output? What do you see instead?
A new drive!

What version of the product are you using?

win-sshfs: 0.0.1.5
Client OS: Windows 7 64 bit
Server OS: Amazon Linux 64 bit
Ssh server: ?

Please provide any additional information below.

I am using an open ssh key without a password on it. The same key file works 
perfectly on dokan sshfs [ 
http://dokan-dev.net/wp-content/uploads/dokan-sshfs-0.6.0.zip ]

Original issue reported on code.google.com by lord....@gmail.com on 30 Aug 2012 at 5:33

Attachments:

GoogleCodeExporter commented 9 years ago
I am having this same problem.  Keys generated by OpenSSH work correctly.  The 
only difference I could find was that the private keys Amazon produces format 
the RSA key with 77 characters per line, while OpenSSH stores a key with 65 
characters per line.

Original comment by compg...@gmail.com on 16 Sep 2012 at 8:50

GoogleCodeExporter commented 9 years ago

Original comment by mladenov...@gmail.com on 7 Oct 2012 at 7:07

GoogleCodeExporter commented 9 years ago
That would not be the message if app doesn't know how to interpret keys. I've 
included a patch that allows usage of Amazon ssh key. I know t weird to ask 
this ,but can you send me a copy of your private and public key so I could done 
some tests?

Original comment by mladenov...@gmail.com on 8 Oct 2012 at 9:04

GoogleCodeExporter commented 9 years ago
I seem to have a similar problem, though I can't even get sshfs manager to 
recognize my EC2 key, which is a .PEM key generated by Amazon.  I get an error 
message "File doesn't seem to be a valid private key file" when I attempt to 
insert the file as the key.  It also doesn't work with the PuTTY private keys 
I've generated to connect with PuTTY.

Original comment by george.g...@gmail.com on 24 Oct 2012 at 3:37

Attachments:

GoogleCodeExporter commented 9 years ago
It only recognizes OpenSsh keys . You can use puttygen.exe to export your putty 
keys to those.

Original comment by mladenov...@gmail.com on 24 Oct 2012 at 7:20

GoogleCodeExporter commented 9 years ago
I checked.
Amazon EC2 key: 76 characters per line and CRLF
'Valid' private key: 64 characters per line and LF

Original comment by red...@gmail.com on 10 Jan 2013 at 6:03

GoogleCodeExporter commented 9 years ago
Is anyone resolved the problem? Using the same private key to successfully log 
in SFTP on Windows, I still can't mount EC2.

Original comment by ads901...@gmail.com on 18 Jan 2013 at 6:01

GoogleCodeExporter commented 9 years ago
I managed to get the EC2 private key working by just re-formatting the 76 
characters per line into 64 characters per line. That is, I joined the private 
key into one long line (1592 characters) and broke it into 64 character lines. 
This works fine.

Original comment by root.n...@gmail.com on 16 Mar 2013 at 3:25

GoogleCodeExporter commented 9 years ago
use this for linux : 

$ fold -64 existingkeyfile > newkeyfile

you'll need to make sure the file doesn't have spaces at the end of each line. 

not sure what your options are in windows. Use notepad, probably. 

Original comment by mark.faz...@gmail.com on 22 Oct 2013 at 11:13

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Here is how I use sshfs-manager for Amazon EC2:

    1. Use puttygen to convert .pem to .ppk as is instructed by http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html
    2. After successfully logging into the server via putty, go to ~/.ssh/authorized_keys and concatenate your own ssh public key.
    3. Open sshfs-manager and choose the private key of previous step.

The ssh key-pair (id_rsa and id_rsa.pub) is generated by
    ssh-keygen -t rsa
as is instructed by https://help.github.com/articles/generating-ssh-keys.

Original comment by xiazhich...@gmail.com on 4 Mar 2014 at 8:37

GoogleCodeExporter commented 9 years ago
Exactly same issue happen on exactly same hardware (Win7x64). Tried on cygwin 
fold -64 existingkeyfile > newkeyfile buu my key is already folded after 64 
character. :-( Any progress with explanation at least? Can anyone glance into 
the code?

Where can I see the logs on my workstation? Nothing interesting in working dir 
of C:\Users\me\AppData\Local\Temp\sfx.{F9F7D530-some-4355-BCF9-guid}.dir\ 

Original comment by Rem...@gmail.com on 9 Mar 2014 at 2:36

GoogleCodeExporter commented 9 years ago
Looking at the ProcessMonitor output I would love to dig into decrypted traffic 
with favourite network analyzer.

http://i.imgur.com/I1Vnn62.png

Original comment by Rem...@gmail.com on 9 Mar 2014 at 3:35

GoogleCodeExporter commented 9 years ago
If you have an issue like #4  "File doesn't seem to be a valid private key 
file", you should to cut from you *.ppk file only private key and mark it 
"-----BEGIN RSA PRIVATE KEY-----" at the first line and "-----END RSA PRIVATE 
KEY-----" at the last one. This is the output format of ssh-keygen utility. 

Original comment by vladimir...@gmail.com on 11 Apr 2014 at 9:42

GoogleCodeExporter commented 9 years ago
I had a similar problem until upgrading PuttyGen to 0.63

Original comment by ch...@bayliss-it.com.au on 23 May 2014 at 9:02

GoogleCodeExporter commented 9 years ago
Hi, 
when I click on "Mount", I get an error message.

Is anyone resolved the problem?

Original comment by h.ture...@gmail.com on 12 Sep 2014 at 10:13

Attachments:

GoogleCodeExporter commented 9 years ago
I got this working using puttygen to convert the ppk, back to an OpenSSH pem.  
Open the private ppk file.  Then select Converstions, export to OpenSSH and it 
works.

Original comment by miles.dy...@gmail.com on 17 Oct 2014 at 7:42

GoogleCodeExporter commented 9 years ago
A combination of #9 and #11 worked for me - thanks guys.

I did the following:

1. Uploaded original .pem to linux server
2. Ran $ fold -64 original.pem > new.pem
3. Downloaded this new file and successfully used it in SSHFS Manager.

Elan

Original comment by e...@applicable.co.nz on 27 Feb 2015 at 5:03