Cannot connect to SFTP server when creating a new project (2017.3.4)
Hi, I have a problem with project on a remote host. While creating the 'deployment configuration', I'm setting up everything exactly like on a working netbeans configuration i.e. SFTP on port 22, with no proxy, using either password or keypair (the end result is the same), but unfortunately connection cannot be established (error message: 'connection to [hostname] failed. could not connect to SFTP server at').
I enabled extended log gathering by adding #com.jetbrains.plugins.webDeployment to the help -> debug log settings and I was given something like that:
2018-02-01 14:17:10,924 [6413950] DEBUG - t.connections.RemoteConnection - Opening connection to sftp://sysmgt4.aro.lsy.fra.dlh.de:22/ in @5d404f10
2018-02-01 14:17:10,926 [6413952] DEBUG - etbrains.plugins.webDeployment - Setting up ssh connection to sysmgt4.aro.lsy.fra.dlh.de:22 for filip, with password, with identities, with socketFactory com.intellij.ssh.sockets.MySftpSocketFactory@0, with keepAliveTimeout 30000, with serverAliveCountMax 1000, with timeout 30000, with daemonThread true
With config StrictHostKeyChecking = ask, PreferredAuthentications = publickey,keyboard-interactive,password,
2018-02-01 14:17:10,926 [6413952] DEBUG - ins.plugins.webDeployment.sftp - Connecting to sysmgt4.aro.lsy.fra.dlh.de port 22
2018-02-01 14:17:10,956 [6413982] DEBUG - ins.plugins.webDeployment.sftp - Connection established
2018-02-01 14:17:10,982 [6414008] DEBUG - ins.plugins.webDeployment.sftp - Remote version string: SSH-2.0-OpenSSH_5.3
2018-02-01 14:17:10,982 [6414008] DEBUG - ins.plugins.webDeployment.sftp - Local version string: SSH-2.0-JSCH-0.1.54
2018-02-01 14:17:10,982 [6414008] DEBUG - ins.plugins.webDeployment.sftp - CheckCiphers: aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
2018-02-01 14:17:10,983 [6414009] DEBUG - ins.plugins.webDeployment.sftp - aes256-ctr is not available.
2018-02-01 14:17:10,983 [6414009] DEBUG - ins.plugins.webDeployment.sftp - aes192-ctr is not available.
2018-02-01 14:17:10,983 [6414009] DEBUG - ins.plugins.webDeployment.sftp - aes256-cbc is not available.
2018-02-01 14:17:10,983 [6414009] DEBUG - ins.plugins.webDeployment.sftp - aes192-cbc is not available.
2018-02-01 14:17:10,983 [6414009] DEBUG - ins.plugins.webDeployment.sftp - CheckKexes: diffie-hellman-group14-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
2018-02-01 14:17:11,042 [6414068] DEBUG - ins.plugins.webDeployment.sftp - CheckSignatures: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
2018-02-01 14:17:11,042 [6414068] DEBUG - ins.plugins.webDeployment.sftp - SSH_MSG_KEXINIT sent
2018-02-01 14:17:11,056 [6414082] DEBUG - ins.plugins.webDeployment.sftp - SSH_MSG_KEXINIT received
2018-02-01 14:17:11,057 [6414083] DEBUG - ins.plugins.webDeployment.sftp - kex: server: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
2018-02-01 14:17:11,057 [6414083] DEBUG - ins.plugins.webDeployment.sftp - kex: server: ssh-rsa,ssh-dss
2018-02-01 14:17:11,057 [6414083] DEBUG - ins.plugins.webDeployment.sftp - kex: server: aes256-ctr,aes192-cbc,aes256-cbc
2018-02-01 14:17:11,057 [6414083] DEBUG - ins.plugins.webDeployment.sftp - kex: server: aes256-ctr,aes192-cbc,aes256-cbc
2018-02-01 14:17:11,057 [6414083] DEBUG - ins.plugins.webDeployment.sftp - kex: server: hmac-sha2-512,hmac-sha1
2018-02-01 14:17:11,057 [6414083] DEBUG - ins.plugins.webDeployment.sftp - kex: server: hmac-sha2-512,hmac-sha1
2018-02-01 14:17:11,057 [6414083] DEBUG - ins.plugins.webDeployment.sftp - kex: server: none,zlib@openssh.com
2018-02-01 14:17:11,057 [6414083] DEBUG - ins.plugins.webDeployment.sftp - kex: server: none,zlib@openssh.com
2018-02-01 14:17:11,057 [6414083] DEBUG - ins.plugins.webDeployment.sftp - kex: server:
2018-02-01 14:17:11,057 [6414083] DEBUG - ins.plugins.webDeployment.sftp - kex: server:
2018-02-01 14:17:11,057 [6414083] DEBUG - ins.plugins.webDeployment.sftp - kex: client: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
2018-02-01 14:17:11,057 [6414083] DEBUG - ins.plugins.webDeployment.sftp - kex: client: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
2018-02-01 14:17:11,057 [6414083] DEBUG - ins.plugins.webDeployment.sftp - kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc
2018-02-01 14:17:11,057 [6414083] DEBUG - ins.plugins.webDeployment.sftp - kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc
2018-02-01 14:17:11,057 [6414083] DEBUG - ins.plugins.webDeployment.sftp - kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
2018-02-01 14:17:11,057 [6414083] DEBUG - ins.plugins.webDeployment.sftp - kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
2018-02-01 14:17:11,057 [6414083] DEBUG - ins.plugins.webDeployment.sftp - kex: client: none
2018-02-01 14:17:11,057 [6414083] DEBUG - ins.plugins.webDeployment.sftp - kex: client: none
2018-02-01 14:17:11,057 [6414083] DEBUG - ins.plugins.webDeployment.sftp - kex: client:
2018-02-01 14:17:11,057 [6414083] DEBUG - ins.plugins.webDeployment.sftp - kex: client:
2018-02-01 14:17:11,057 [6414083] DEBUG - ins.plugins.webDeployment.sftp - Disconnecting from sysmgt4.aro.lsy.fra.dlh.de port 22
2018-02-01 14:17:11,057 [6414083] WARN - t.connections.RemoteConnection - Retrying connecting to sftp://sysmgt4.aro.lsy.fra.dlh.de:22/ in @5d404f10: 1 iterations
org.apache.commons.vfs2.FileSystemException: Could not determine the type of file "sftp://sysmgt4.aro.lsy.fra.dlh.de/".
at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:1504)
at org.apache.commons.vfs2.provider.AbstractFileObject.isFile(AbstractFileObject.java:1689)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doListChildrenResolved(SftpFileObject.java:462)
at org.apache.commons.vfs2.provider.AbstractFileObject.getChildren(AbstractFileObject.java:1142)
at org.apache.commons.vfs2.provider.AbstractFileObject.getChild(AbstractFileObject.java:1095)
at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionPool.createConnection(RemoteConnectionPool.java:192)
at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionManager.openConnection(RemoteConnectionManager.java:140)
at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionManager.openConnection(RemoteConnectionManager.java:84)
at com.jetbrains.plugins.webDeployment.PublishUtils.lambda$null$1(PublishUtils.java:101)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:315)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.commons.vfs2.FileSystemException: Could not connect to SFTP server at "sftp://sysmgt4.aro.lsy.fra.dlh.de/".
at com.jetbrains.plugins.webDeployment.connections.PatchedSftpFileSystem.getChannel(PatchedSftpFileSystem.java:107)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.statSelf(SftpFileObject.java:177)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doGetType(SftpFileObject.java:112)
at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:1495)
... 14 more
Caused by: com.intellij.ssh.SshTransportException: Algorithm negotiation fail
at com.intellij.ssh.impl.SshConnection.b(SshConnection.kt:120)
at com.intellij.ssh.impl.SshConnection.openChannel(SshConnection.kt:68)
at com.intellij.ssh.SshConnectionService.sftp(SshConnectionService.kt:170)
at com.jetbrains.plugins.webDeployment.connections.PatchedSftpFileSystem.getChannel(PatchedSftpFileSystem.java:57)
... 17 more
Caused by: com.jcraft.jsch.JSchException: Algorithm negotiation fail
at com.jcraft.jsch.Session.receive_kexinit(Session.java:590)
at com.jcraft.jsch.Session.connect(Session.java:320)
at com.jcraft.jsch.Session.connect(Session.java:183)
at com.intellij.ssh.impl.SshConnection.a(SshConnection.kt:142)
at com.intellij.ssh.impl.SshConnection.b(SshConnection.kt:109)
... 20 more
2018-02-01 14:17:11,058 [6414084] WARN - loyment.ui.WebServerConfigForm - Could not determine the type of file "sftp://sysmgt4.aro.lsy.fra.dlh.de/".
org.apache.commons.vfs2.FileSystemException: Could not determine the type of file "sftp://sysmgt4.aro.lsy.fra.dlh.de/".
at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:1504)
at org.apache.commons.vfs2.provider.AbstractFileObject.isFile(AbstractFileObject.java:1689)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doListChildrenResolved(SftpFileObject.java:462)
at org.apache.commons.vfs2.provider.AbstractFileObject.getChildren(AbstractFileObject.java:1142)
at org.apache.commons.vfs2.provider.AbstractFileObject.getChild(AbstractFileObject.java:1095)
at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionPool.createConnection(RemoteConnectionPool.java:192)
at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionManager.openConnection(RemoteConnectionManager.java:140)
at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionManager.openConnection(RemoteConnectionManager.java:84)
at com.jetbrains.plugins.webDeployment.PublishUtils.lambda$null$1(PublishUtils.java:101)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:315)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.commons.vfs2.FileSystemException: Could not connect to SFTP server at "sftp://sysmgt4.aro.lsy.fra.dlh.de/".
at com.jetbrains.plugins.webDeployment.connections.PatchedSftpFileSystem.getChannel(PatchedSftpFileSystem.java:107)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.statSelf(SftpFileObject.java:177)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doGetType(SftpFileObject.java:112)
at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:1495)
... 14 more
Caused by: com.intellij.ssh.SshTransportException: Algorithm negotiation fail
at com.intellij.ssh.impl.SshConnection.b(SshConnection.kt:120)
at com.intellij.ssh.impl.SshConnection.openChannel(SshConnection.kt:68)
at com.intellij.ssh.SshConnectionService.sftp(SshConnectionService.kt:170)
at com.jetbrains.plugins.webDeployment.connections.PatchedSftpFileSystem.getChannel(PatchedSftpFileSystem.java:57)
... 17 more
Caused by: com.jcraft.jsch.JSchException: Algorithm negotiation fail
at com.jcraft.jsch.Session.receive_kexinit(Session.java:590)
at com.jcraft.jsch.Session.connect(Session.java:320)
at com.jcraft.jsch.Session.connect(Session.java:183)
at com.intellij.ssh.impl.SshConnection.a(SshConnection.kt:142)
at com.intellij.ssh.impl.SshConnection.b(SshConnection.kt:109)
... 20 more
Is there a way to fix the problem? netbeans with exactly the same setup works like a charm.
thanks and regards,
Filip
请先登录再写评论。
A known issue: https://youtrack.jetbrains.com/issue/WI-35518
Workaround is to download Oracle JCE USP and replace with it bundled PhpStorm files at <PhpStorm installation path>\jre64\lib\security.
See the latest comments in the abovementioned thread, e.g. this and this
great! Thanks a lot Dmitry - adding JCE indeed solved the problem.