pycharm sftp connection failed


I try to connect my host, but failed. The error log is below, how could I fix it ?

2019-03-18 16:59:09,951 [ 977209] WARN - loyment.ui.WebServerConfigForm - Could not determine the type of file "s".
org.apache.commons.vfs2.FileSystemException: Could not determine the type of file "s".
at org.apache.commons.vfs2.provider.AbstractFileObject.getType(
at org.apache.commons.vfs2.provider.AbstractFileObject.isFile(
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doListChildrenResolved(
at org.apache.commons.vfs2.provider.AbstractFileObject.getChildren(
at org.apache.commons.vfs2.provider.AbstractFileObject.getChild(
at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionPool.lambda$createConnection$0(
at com.intellij.openapi.application.impl.ApplicationImpl$
at java.util.concurrent.Executors$
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
Caused by: org.apache.commons.vfs2.FileSystemException: Could not connect to SFTP server at "s".
at com.jetbrains.plugins.webDeployment.connections.PatchedSftpFileSystem.getChannel(
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.statSelf(
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doGetType(
at org.apache.commons.vfs2.provider.AbstractFileObject.getType(
... 11 more
Caused by: com.intellij.ssh.SshTransportException: Session.connect: 连接超时 (Connection timed out)
at com.intellij.ssh.impl.SshConnection.a(SshConnection.kt:120)
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(
... 14 more
Caused by: com.jcraft.jsch.JSchException: Session.connect: 连接超时 (Connection timed out)
at com.jcraft.jsch.Session.connect(
at com.jcraft.jsch.Session.connect(
at com.intellij.ssh.impl.SshConnection.b(SshConnection.kt:142)
at com.intellij.ssh.impl.SshConnection.a(SshConnection.kt:109)
... 17 more
2019-03-18 17:00:32,914 [1060172] WARN - t.connections.RemoteConnection - Forced closing file system of s in @5e048458
2019-03-18 17:00:32,915 [1060173] DEBUG - t.connections.RemoteConnection - File system of s in @5e048458 is closed.


Are you trying to configure remote interpreter and automatically create deployment for it?

Do you have problems accessing your remote host from the system terminal (outside of PyCharm)?


I am also receiving this error in my logs. For me, I was able to set up automatic deployments, and it was working just last week. But now it started giving this error, both in PhpStorm and RubyMine. I am able to access my remote host from the system terminal and also from another SFTP file transfer program, Cyberduck.

Edit: Also, using my password instead of "Key pair OpenSSH or PuTTY" to connect works just fine.


May I ask you to try recreating your remote interpreter and deployment configuration from scratch (remove existing ones and create again)?

Does it help?

If not, please add the following lines to Help | Debug Log Settings…, reproduce the problem, upload renamed idea.log from Help | Show Log in…. to and let me know the name of that file.





Retrying from scratch didn't help, unfortunately. I have added those lines in the debug log settings, reproduced the problem, and I have uploaded my log file, 'jnmuhich-idea.log'. Let me know what you think.



Which Authentication type do you currently use?

Please check that it is saved under "Preferences | Build... | Deployment "


I am trying to use 'Key Pair...' which is what I had working last week.


Do you use any custom algorithms in ssh config?

What is your version of OpenSSH?


I am not aware of any custom algorithms in ssh config.

My OpenSSH is version 7.9p1.


Apparently it is related to since we do not yet support OpenSSH 7.8+
Try downgrading your OpenSSH


Would I just need to downgrade, or would I also need to create new ssh keys? Thanks so much for your assistance.


I have fixed my issue. The home directory on the server was set to 777 permissions. When I changed it to have 755 permissions, I was able to use the ssh key with no issue.


Please sign in to leave a comment.