Open Stefanbracke opened 7 years ago
I'm also having issues. I can connect with terminal over SSH and in FileZilla so I know my host name, user and key are good.
Same here, Phillip, everything works in Coda 2.5 : an application on osx i try to get away from but atom won't let me... sigh..
Been using this to connect to EC2 instances just fine
{
"protocol": "sftp",
"host": "host-endpoint",
"port": 22,
"user": "username",
"remote": "remote/working/directory",
"local": "",
"agent": "",
"privatekey": "path/to/local/pemfile",
"promptForPass": true,
"keepalive": 10000,
"keyboardInteractive": false
}
Why would you set promotForPass to true? Which pass should you enter?The user is "ec2-user" right?
promptForPass
is for the pem/ppk file password (if set). Not for the ec2 user password.
What you're thinking of is the keyboardInteractive
field. Which allows username/password logins to the target machine.
I only allow private key authentication for my EC2 instance logins, so I set keyboardInteractive
to false.
Thanks for the helpful information @jackalstomper
Linking to https://github.com/mgrenier/remote-ftp/issues/7 for when someone updates the docs.
This is my config that's still not working:
{
"protocol": "sftp",
"host": "PUBLIC_DNS",
"port": 22,
"user": "USERNAME",
"pass": "",
"promptForPass": false,
"remote": "/opt/bitnami/apps/wordpress/htdocs",
"local": "PATH_TO_LOCAL_DIR",
"agent": "",
"privatekey": "PATH_TO_LOCAL_KEY",
"passphrase": "",
"hosthash": "",
"ignorehost": true,
"connTimeout": 10000,
"keepalive": 10000,
"keyboardInteractive": false,
"watch": [],
"watchTimeout": 500
}
@philliptmaddox Any error messages? Is your privatekey unencrypted and readable to the user who executes Atom? If the key can't be read it's unfortunately just silently ignored
You could try to set "debug":true
in the .ftpconfig and see what the developer console reads...
The private key is unencrypted and should not be the issue.
This is all I'm getting: Remote FTP: Error: All configured authentication methods failed
I'm wondering if my file path is right for ssh? "~/.ssh/NameofKey.pem"
Did you try an absolute path?
Yes, thats the issue! Use an absolute path instead of the ~
bit for your homedir.
I've now added an error popup when the privateKey file can't be read :)
Still doesn't work: Remote FTP: Error: All configured authentication methods failed . (nothing showing up in console)
{ "protocol": "sftp", "host": "152.128.231.81", "port": 22, "user": "ec2-user", "promptForPass": false, "remote": "/opt/app/current/www", "agent": "", "privatekey": "/Users/stef/Documents/AWS/awsec2specifickeyforthiswebsite.pem", "passphrase": "", "ignorehost": true, "conTimeout": 10000, "keepalive": 10000, "debug": true, "keyboardInteractive": false, "watch": [], "watchTimeout": 500 }
@jpxd that did it. Thanks!
@Stefanbracke if you're using bitnami, try 'bitnami' as the user instead of ec2-user
@Stefanbracke If you're using Windows, you should be adding C: before /Users
Similar for other OS... it is best if you're starting from the absolute root of the drive the key is on and address your way to the folder without any relative paths
I had an issue where it couldn't read the private key file on my local computer I had ~/.ssh permissions set to 700 I had ~/.ssh/key set to 600
to fix it I set ~/.ssh permissions set to 770 I set ~/.ssh/key set to 660
Does anyone have an clear and working example of a .ftpconfig for an AWS EC2 sftp connection? (using a pem-file)