SFTP to Amazon EC2 instance doesn't work

I have successfully set up a project hosted on a Linode Ubuntu instance using SFTP. However, I cannot connect to an Amazon EC2 instance running AMI linux. Note that I can connect via the terminal using the exact same params (username, certificate file) as I'm using with PHPStorm.

From PHPStorm, I see an error message stating "Too many authentication failures". When I look in the server logs, I see:

Failed password for user from nn.nn.nn.nn port nnnn ssh2

Nov  4 14:16:06 ip-NN-NN-NN-NN sshd[3517]: Failed password for user from nn.nn.nn.nn.nn port nnnnn ssh2

Nov  4 14:16:06 ip-NN-NN-NN-NN sshd[3517]: Failed password for user from nn.nn.nn.nn.nn port nnnnn ssh2

Nov  4 14:16:06 ip-NN-NN-NN-NN sshd[3517]: Failed password for user from nn.nn.nn.nn.nn port nnnnn ssh2

Nov  4 14:16:06 ip-NN-NN-NN-NN sshd[3517]: Failed password for user from nn.nn.nn.nn.nn port nnnnn ssh2

Nov  4 14:16:06 ip-NN-NN-NN-NN sshd[3517]: Failed password for user from nn.nn.nn.nn.nn port nnnnn ssh2

Nov  4 14:16:06 ip-NN-NN-NN-NN sshd[3517]: Disconnecting: Too many authentication failures for user [preauth]

What I should see is something like this:

Nov  7 22:43:28 ip-NN-NN-NN-NN sshd[9492]: Accepted publickey for user from nn.nn.nn.nn port nnnnn ssh2: RSA 1a:1a:1a:1a:1a:1a:1a:1a:1a:1a:1a:1a:a1:1a:1a:ca

Nov  7 22:43:28 ip-NN-NN-NN-NN sshd[9492]: pam_unix(sshd:session): session opened for user user by (uid=0)

So basically, even though I have set up the connection as SFTP using a certificate file, PHPStorm is attempting a plain username/password challenge response. I'm at a loss to explain why it would behave differently for the 2 different systems. It would help if I could enable verbose mode on PHPstorm to see what it's doing, but I can't figure out how to do that (searched)? I can see the java exception trace in the idea.log, but that's not so helpful. It does show a sftp://NN.NN.NN.NN connection attempt that failed, but no details.

Any ideas?

I also tried installing the Amazon EC2 plugin, but the docs are outdated and I cannot figure out how to configure the settings for it. Furthermore, there is a log entry stating that the Amazon EC2 Plugin is disabled. It is not disabled (checkbox is checked) and I have rebooted PHPStorm multiple times.

This program would definitely be worth some money to me if I could connect to my client's EC2 server with it....

3 comments
Comment actions Permalink

Ok - well that was a bit helpful. If I compare the logs of my successful (Ubuntu) connection to the failed (EC2) connection, the only line that stands out is

ins.plugins.webDeployment.sftp - Next authentication method: publickey

ins.plugins.webDeployment.sftp - Authentication succeeded (publickey).

That is to say, they both zip thru all the requisite steps and the logs are identical (except IP addys), then try publickey, but whereas the Ubuntu connection then says "succeeded", the EC2 connection simply says

ins.plugins.webDeployment.sftp - Authentications that can continue: password

So it fails (we knew that), but doesn't say why (it actually doesn't even say it failed, just moves to the next auth method). I had thought it may be something wrong with supported algorithms within the java libs. This is because I have meanwhile tried Deltawalker which is a diff/compare tool also written in java. It has the same functionality (connect to files over sftp) and similarly works with the Ubuntu server and fails with the EC2 (tho it fails in a different way - server logs look different). However, the client/server algo compare/test sections of the connection logs look identical for both Ubuntu and EC2 with PHPStorm.

0
Comment actions Permalink

I'm not an expert in this by any means .. so right now I may only suggest to submit support ticket together with your idea.log (including this SFTP log) and findings to https://intellij-support.jetbrains.com/hc/en-us/requests/new

Support team will eother be able to resolve this or will convert it into proper bug ticket on Issue Tracker .

0

Please sign in to leave a comment.