Privatekey auth not working
See original GitHub issueFirst 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:
- Created 7 years ago
- Comments:5
Top GitHub Comments
Had the samme issue and found this 😃
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)