SFTP Failing with RSA and DSA keys...

I'm trying to connect to our aws server via sftp on PHPStorm 2.1.1 via Mac OS X Lion.  I've installed the lastest rev of jsch (1.44) jar file in the application directory and I can successfully connect from the shell:


Mike-Shallops-MacBook-Pro-2:.ssh mikeshallop$ ssh -i ~/.ssh/id_dsa mshallop@awsqa-llapp1.nileproject.com -v
OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /Users/mikeshallop/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug1: Applying options for *
debug1: Connecting to awsqa-llapp1.nileproject.com [50.17.235.158] port 22.
debug1: Connection established.
debug1: identity file /Users/mikeshallop/.ssh/id_dsa type 2
debug1: identity file /Users/mikeshallop/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH_4*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'awsqa-llapp1.nileproject.com' is known and matches the RSA host key.
debug1: Found key in /Users/mikeshallop/.ssh/known_hosts:8
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/mikeshallop/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: Authentication succeeded (publickey).
Authenticated to awsqa-llapp1.nileproject.com ([50.17.235.158]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Requesting X11 forwarding with authentication spoofing.
debug1: Requesting authentication agent forwarding.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: Remote: No xauth program; cannot forward with spoofing.
Last login: Mon Aug 22 18:12:14 2011 from 173-11-108-242-sfba.hfc.comcastbusiness.net


Authentication is failing when I attempt to connect via the IDE -- the server-side logs are telling me that the dsa or rsa keys are found...right before the client disconnects:


Aug 22 19:04:27 ip-10-32-23-26 sshd[26948]: Found matching DSA key: 7a:ff:57:85:f2:c9:d0:44:23:36:6c:12:48:2a:d9:48
Aug 22 19:04:27 ip-10-32-23-26 sshd[26948]: debug1: restore_uid: 0/0
Aug 22 19:04:27 ip-10-32-23-26 sshd[26951]: Postponed publickey for mshallop from 173.11.108.242 port 42906 ssh2
Aug 22 19:04:27 ip-10-32-23-26 sshd[26951]: Received disconnect from 173.11.108.242: 3: com.jcraft.jsch.JSchException: Auth fail


My console log isn't really that much help - just tells me that it couldn't connect:


8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm: [ 203584]   WARN - loyment.ui.WebServerConfigForm - Could not connect to SFTP server at "sftp://awsqa-llapp1.nileproject.com/".
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm: org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server at "sftp://awsqa-llapp1.nileproject.com/".
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at org.apache.commons.vfs.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:106)
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.getFileSystem(AbstractOriginatingFileProvider.java:103)
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:82)
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at org.apache.commons.vfs.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:66)
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:692)
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:620)
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionPool.createConnection(RemoteConnectionPool.java:120)
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionManager.openConnection(RemoteConnectionManager.java:105)
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at com.jetbrains.plugins.webDeployment.PublishUtils$1$1.run(PublishUtils.java:108)
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:375)
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at java.util.concurrent.FutureTask.run(FutureTask.java:138)
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at java.lang.Thread.run(Thread.java:680)
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:130)
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm: Caused by: org.apache.commons.vfs.FileSystemException: Could not connect to SFTP server at "awsqa-llapp1.nileproject.com".
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at org.apache.commons.vfs.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:268)
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at org.apache.commons.vfs.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:95)
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  ... 16 more
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm: Caused by: com.jcraft.jsch.JSchException: Auth fail
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at com.jcraft.jsch.Session.connect(Session.java:452)
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at com.jcraft.jsch.Session.connect(Session.java:150)
8/22/11 12:15:28.028 PM [0x0-0x2aa2aa].com.jetbrains.PhpStorm:  at org.apache.commons.vfs.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:264)

I've tried both RSA and DSA keys with identical results.  I've no problems tunneling into the remote server using apps like navicat or acessing via the command line as shown above.

Any suggestions/ideas welcomed and appreciated...

thanks!

--mike
1 comment
Comment actions Permalink

Hi Michael,

Can you please turn on SFTP logging and try it again? There should be more messages in the log.

Also did you mean you've put jsch-0.1.44.jar instead of PHPSTORM_HOME\plugins\webDeployment\lib\jsch-0.1.42.jar? If not, please do it before taking the logs.

Regards,
Kirill

Message was edited by: Kirill Safonov

0

Please sign in to leave a comment.