question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Privatekey auth not working

See original GitHub issue

First off I’d like to state that I might be wrong, but due to the scarce documentation I resorted to open an issue.

I’m trying to connect to my server using sftp protocol on a non standard port with private key based authentication instead of password based. My .ftpconfig file looks like this

{
    "protocol": "sftp",
    "host": "{HOST}",
    "port": {NON-STANDARD_PORT},
    "user": "{USER}",
    "pass": "",
    "promptForPass": false,
    "remote": "{REMOTE_DIR}",
    "local": "",
    "agent": "",
    "privatekey": "~/.ssh/id_rsa",
    "passphrase": "",
    "hosthash": "",
    "ignorehost": true,
    "connTimeout": 10000,
    "keepalive": 10000,
    "keyboardInteractive": false,
    "watch": [],
    "watchTimeout": 500
}

What I’m not sure about is whether I’m making a mistake in the settings or is a remote-ftp issue. I should mention that if I try to connect from command line with the exact same parameters I can access properly, so either I’m wrong or there’s an issue in the package. sftp {USER}@{HOST} -p {NON-STANDARD_PORT}

The message I get when I try to connect within Atom is Remote FTP: Error: All configured authentication methods failed

The only thing I could get from the documentation are that the key has to be OpenSSH format (which is) and that instead of inserting the actual key I have to use its path (which I’m sure it’s correct).

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
olafghanizadehcommented, Jan 21, 2017

Had the samme issue and found this 😃

1reaction
neto-bencommented, Nov 15, 2016

I had the same problem. Turns out it doesn’t support “~” in the privatekey field. Changed it to “/home/ben/.ssh/id_rsa” and it seems to be working fine now! (Turn on “promptForPass” so it will ask for the passphrase)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting SSH Key Authentication | Linode
The SSH Client Does Not Possess the Correct Private Key · Log in to the Linode using the LISH Console. · Edit the...
Read more >
Why am I still getting a password prompt with ssh with public ...
Our problem was that login worked from one client but not from another (the .ssh directory was NFS mounted and both clients were...
Read more >
SSH private key authentication not working in Ubuntu server
If key authentication doesn't work, then it doesn't work independently from other authentication types. They don't interfere with each other. ( ...
Read more >
Authentication with Private Key does not work - Stack Overflow
I try to connect SFTP Server using Jsch Library. It works when i use username/password, but with private/public key does not work. i...
Read more >
FAQ / Why isn't my private key working? JuiceSSH still ...
FAQ / Why isn't my private key working? JuiceSSH still prompts for password authentication · Only your user has write/execute permissions on your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found