Still Cannot Add SFTP Deployment via Pycharm?

I've read all the post about the SFTP connection fail in the posts? But they do not work for me. My remote sftp server is forwarded on localhost:2333 vis SSH Tunnel. I tried another unforwarded server, and it couldn't work as well. I also tried to change the authentication type to many other things, such as 'password' and 'OpenSSH config and authentication agent', they didn't work as well. Here's my log:

 


2019-03-22 02:36:29,564 [46293165] WARN - t.connections.RemoteConnection - Retrying connecting to sftp://localhost:2333/ in @7e8d4b8c: 1 iterations
org.apache.commons.vfs2.FileSystemException: Could not determine the type of file "sftp://localhost:2333/".
at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:1437)
at org.apache.commons.vfs2.provider.AbstractFileObject.isFile(AbstractFileObject.java:1605)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doListChildrenResolved(SftpFileObject.java:462)
at org.apache.commons.vfs2.provider.AbstractFileObject.getChildren(AbstractFileObject.java:1091)
at org.apache.commons.vfs2.provider.AbstractFileObject.getChild(AbstractFileObject.java:1044)
at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionPool.lambda$createConnection$0(RemoteConnectionPool.java:260)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
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://localhost:2333/".
at com.jetbrains.plugins.webDeployment.connections.PatchedSftpFileSystem.getChannel(PatchedSftpFileSystem.java:108)
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:1428)
... 11 more
Caused by: com.intellij.ssh.SshTransportException: Using of known_hosts file /Users/limuyang/.ssh/known_hosts failed
at com.intellij.ssh.SshConnectionUtil.a(SshConnectionUtil.kt:612)
at com.intellij.ssh.SshConnectionUtil.a(SshConnectionUtil.kt:602)
at com.intellij.ssh.SshConnectionUtil.setUpSession(SshConnectionUtil.kt:164)
at com.intellij.ssh.impl.SshConnection.a(SshConnection.kt:130)
at com.intellij.ssh.impl.SshConnection.b(SshConnection.kt:109)
at com.intellij.ssh.impl.SshConnection.openChannel(SshConnection.kt:68)
at com.intellij.ssh.SshConnectionService.sftp(SshConnectionService.kt:182)
at com.jetbrains.plugins.webDeployment.connections.PatchedSftpFileSystem.getChannel(PatchedSftpFileSystem.java:58)
... 14 more
Caused by: com.jcraft.jsch.JSchException: fromBase64: invalid base64 data
at com.jcraft.jsch.Util.fromBase64(Util.java:63)
at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:219)
at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:55)
at com.jcraft.jsch.JSch.setKnownHosts(JSch.java:317)
at com.intellij.ssh.SshConnectionUtil.a(SshConnectionUtil.kt:609)
... 21 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 386
at com.jcraft.jsch.Util.fromBase64(Util.java:52)
... 25 more
2019-03-22 02:36:29,565 [46293166] WARN - loyment.ui.WebServerConfigForm - Could not determine the type of file "sftp://localhost:2333/".
org.apache.commons.vfs2.FileSystemException: Could not determine the type of file "sftp://localhost:2333/".
at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:1437)
at org.apache.commons.vfs2.provider.AbstractFileObject.isFile(AbstractFileObject.java:1605)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doListChildrenResolved(SftpFileObject.java:462)
at org.apache.commons.vfs2.provider.AbstractFileObject.getChildren(AbstractFileObject.java:1091)
at org.apache.commons.vfs2.provider.AbstractFileObject.getChild(AbstractFileObject.java:1044)
at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionPool.lambda$createConnection$0(RemoteConnectionPool.java:260)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
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://localhost:2333/".
at com.jetbrains.plugins.webDeployment.connections.PatchedSftpFileSystem.getChannel(PatchedSftpFileSystem.java:108)
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:1428)
... 11 more
Caused by: com.intellij.ssh.SshTransportException: Using of known_hosts file /Users/limuyang/.ssh/known_hosts failed
at com.intellij.ssh.SshConnectionUtil.a(SshConnectionUtil.kt:612)
at com.intellij.ssh.SshConnectionUtil.a(SshConnectionUtil.kt:602)
at com.intellij.ssh.SshConnectionUtil.setUpSession(SshConnectionUtil.kt:164)
at com.intellij.ssh.impl.SshConnection.a(SshConnection.kt:130)
at com.intellij.ssh.impl.SshConnection.b(SshConnection.kt:109)
at com.intellij.ssh.impl.SshConnection.openChannel(SshConnection.kt:68)
at com.intellij.ssh.SshConnectionService.sftp(SshConnectionService.kt:182)
at com.jetbrains.plugins.webDeployment.connections.PatchedSftpFileSystem.getChannel(PatchedSftpFileSystem.java:58)
... 14 more
Caused by: com.jcraft.jsch.JSchException: fromBase64: invalid base64 data
at com.jcraft.jsch.Util.fromBase64(Util.java:63)
at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:219)
at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:55)
at com.jcraft.jsch.JSch.setKnownHosts(JSch.java:317)
at com.intellij.ssh.SshConnectionUtil.a(SshConnectionUtil.kt:609)
... 21 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 386
at com.jcraft.jsch.Util.fromBase64(Util.java:52)
... 25 more

3 comments

Oh, I am using the latest Pycharm 2018.3.5 Professional Edition.

0

Ok, I clear the known_hosts, and it works now.

0

Thanks for posting your solution, others might find it useful.

0

Please sign in to leave a comment.