Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sftp /scp connection with rsa key does not work #1264

Closed
cyberduck opened this issue Sep 19, 2007 · 22 comments
Closed

sftp /scp connection with rsa key does not work #1264

cyberduck opened this issue Sep 19, 2007 · 22 comments

Comments

@cyberduck
Copy link
Collaborator

@cyberduck cyberduck commented Sep 19, 2007

ccd3a05 created the issue

Hi,

I think that the authentification process is not working when ssh need a passphrase (rsa in my case) for sftp over ssh or scp.
It works fine with in terminal command line ssh and command line sftp (asking for the passphrase because the ssh server is confirgured this way).
Do you plan to enable this possibility in the near future/release ?

Regards,

Thierry


Attachments

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Sep 19, 2007

@dkocher commented

Can you confirm this bug when running version 2.8?

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Nov 19, 2007

d6a76bc commented

I do have the same problem: login via ssh works perfectly, via cyberduck I get an "publickey authentication failed" error (I even tried copy-pasting password to be sure that I use the same as with ssh). my passphrase has blanks in it, maybe thats the problem? but if I store the key in the keychain and go there to have a look at the password I can see the correct passphrase stored there (by cyberduck) so whats the problem?

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Dec 4, 2007

@dkocher commented

I have tested against the latest nightly build also using a password with whitespace.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Dec 10, 2007

d6a76bc commented

I am sorry, I still get the error. I am pretty sure that it is a Cyberduck error because with Fetch, ssh and other tools it works perfectly. Check the error screenshot here

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Dec 20, 2007

@dkocher commented

This may be related to the issue with corrupted Keychain passwords (see #1354). Try deleting any passwords in the Keychain of the server you are trying to connect to. To modify saved passwords in the Keychain, open /Applications/Utilities/Keychain Access.app.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Dec 20, 2007

@dkocher commented

Addendum: For private key passwords, these are stored as SSHKeychain for the Name of the application password in the Keychain.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Jan 7, 2008

d6a76bc commented

I am very sorry to post again. Should I just shut up and stop using Cyberduck? It does not work for me. In every other Application it works but not with Cyberduck. I tried the latest nightly build again from January 3rd.

In the Screenshot I posted there is the command line and error issued. I tried the command and got the following:

sftp root@www.olat.org:22
Connecting to www.olat.org...
Couldn't stat remote file: No such file or directory
File "/root/22" not found.

So I tried it again without the port:

sftp root@www.olat.org
Connecting to www.olat.org...
sftp> exit

Might the port be a problem? Then I thought the problem might be the domain mapping... (who knows, anything possible). So i tried directly with the hostname "idlnx46.uzh.ch". Didnt work either. Also I was not sure why Cyberduck wants a Name for the key. All you usually enter is the passphrase. Of course there is the username to login on the sftp server but this information I enter in my Bookmark (Lesezeichen). I use "root". After that I shoud just be asked about the passphrase. This is a bit confusing...

I will add two screenshots to illustrate what I mean. Just let me know when I should shut up and stop testing :-)

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Jan 7, 2008

d6a76bc commented

I cannot upload the screenshots, I sent them to dkocher.

By the way: It has nothing to do with the keychain because I am not storing the password there.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Jan 21, 2008

@dkocher commented

Have you tried deleting all passwords with the name SSHKeychain from the Keychain?

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented May 15, 2009

DukBerCy commented

I wonder if scp functionality will be added soon.
Cannot find a comfortable way to scp files to remote machines on Mac.
SFTP with Public Key will not work due to the following error:

" I/O Error: Connection failed
Invalid PEM structure, '-----BEGIN...' missing"

Does not work even if the SFTP Setting is set to: "SCP (Secure Copy)" instead of "SFTP (SSH Connection)"

Thank you.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented May 15, 2009

DukBerCy commented

In FileZilla and WinSCP you are able to point to a Private Key, which is used instead of a password for SCP filetransfer.
FileZilla 3.2.4.1 on Mac will work, CyberDuck 3.2 cannot connect due to:
" I/O Error: Connection failed Invalid PEM structure, '-----BEGIN...' missing"

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented May 15, 2009

@dkocher commented

Replying to [comment:13 DukBerCy]:

In FileZilla and WinSCP you are able to point to a Private Key, which is used instead of a password for SCP filetransfer.
FileZilla 3.2.4.1 on Mac will work, CyberDuck 3.2 cannot connect due to:
" I/O Error: Connection failed Invalid PEM structure, '-----BEGIN...' missing"

Try to create a key using the ssh-keygen program from the OpenSSH distribution. The one you are using is not a supported format.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented May 15, 2009

@dkocher commented

Replying to [comment:14 dkocher]:

Replying to [comment:13 DukBerCy]:

In FileZilla and WinSCP you are able to point to a Private Key, which is used instead of a password for SCP filetransfer.
FileZilla 3.2.4.1 on Mac will work, CyberDuck 3.2 cannot connect due to:
" I/O Error: Connection failed Invalid PEM structure, '-----BEGIN...' missing"

Try to create a key using the ssh-keygen program from the OpenSSH distribution. The one you are using is not a supported format.

Also refer to https://trac.cyberduck.io/wiki/help/en/howto/ssh#Howtoconfigurepublickeyauthentication.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Jul 19, 2009

anonymous commented

I can confirm this. rsa pubkeys don't seem to work with cyberduck. Same error message as on the attached image. Perhaps this is an java issue don't work mit muCommander either.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Nov 15, 2009

sidd commented

after updating to cyberduck 3.3 (5552) i cannot login via sftp and id_rsa key anymore (same symptom on 4 different servers). i recently changed my key, but via ssh and sftp in terminal everything works fine on all servers. i tried to get rid of the error by reselecting my ir_rsa key from ~/.ssh, but no luck: cyberduck still echoing "publickey authorization failed". what am i missing? any hints?

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Nov 16, 2009

sidd commented

Replying to [comment:17 sidd]:

i recently changed my key, but via ssh and sftp in terminal everything works fine on all servers. i tried to get rid of the error by reselecting my ir_rsa key from ~/.ssh, but no luck: cyberduck still echoing "publickey authorization failed".

can answer the question myself. needed to setup new SSHKeychain in keychain.app since my pw changed because of new rs_ida key. wasnt aware that cyberduck isn't echoing that and just grabs the wrong, "old" pw from keychain.

should have investigated one step further before posting here. keep up the good work!

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Nov 16, 2009

@dkocher commented

Replying to [comment:18 sidd]:

Replying to [comment:17 sidd]:

i recently changed my key, but via ssh and sftp in terminal everything works fine on all servers. i tried to get rid of the error by reselecting my ir_rsa key from ~/.ssh, but no luck: cyberduck still echoing "publickey authorization failed".

can answer the question myself. needed to setup new SSHKeychain in keychain.app since my pw changed because of new rs_ida key. wasnt aware that cyberduck isn't echoing that and just grabs the wrong, "old" pw from keychain.

should have investigated one step further before posting here. keep up the good work!

Thanks for sharing that information here.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Feb 17, 2010

ce6ccf1 commented

ATTENTION: This is how you can fix it

Make sure you have the following component:

  1. Community sources.
  2. BSD Subsystem
  3. Open SSH (very important that you this on your phone, if not, then dl it on cydia/installer/etc.)

Then try the steps again.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Mar 5, 2010

d492a58 commented

Hi,
I do have the same problem, connect via ssh or sftp on the command line works. but in cyberduck i get "Publickey authentication failed". I have tested this on the newest nightly build.

cheers daniel

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Mar 10, 2010

64ff214 commented

This problem has been present for years.
If a passphrase is present, the connection works
once, and never again.
Instead of using the credentials which the system
already has (through ssh-add -K), cyberduck decodes
without passphrase later on and complains about
wrong PEM structure.

This made me finally switch over to forklift, where
such problems do not exist.

cheers - chris

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Mar 27, 2010

@dkocher commented

Replying to [comment:22 tismer@…]:

This problem has been present for years.
If a passphrase is present, the connection works
once, and never again.
Instead of using the credentials which the system
already has (through ssh-add -K), cyberduck decodes
without passphrase later on and complains about
wrong PEM structure.

This made me finally switch over to forklift, where
such problems do not exist.

cheers - chris

This should be fixed as of 9726969.

Loading

@cyberduck cyberduck closed this Mar 27, 2010
@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented May 15, 2011

cfc646c commented

Using RSA keys with Passphrase does not work on CyberDuck 4.0.2 (8610)! Regression bug? I'm moving to another program...

Loading

@iterate-ch iterate-ch locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants