pycharm sftp connection failed

Answered

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 "sftp://ss1.sockgo.com/".
org.apache.commons.vfs2.FileSystemException: Could not determine the type of file "sftp://ss1.sockgo.com/".
at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:1510)
at org.apache.commons.vfs2.provider.AbstractFileObject.isFile(AbstractFileObject.java:1695)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doListChildrenResolved(SftpFileObject.java:462)
at org.apache.commons.vfs2.provider.AbstractFileObject.getChildren(AbstractFileObject.java:1148)
at org.apache.commons.vfs2.provider.AbstractFileObject.getChild(AbstractFileObject.java:1101)
at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionPool.lambda$createConnection$0(RemoteConnectionPool.java:259)
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://ss1.sockgo.com/".
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:1501)
... 11 more
Caused by: com.intellij.ssh.SshTransportException: Session.connect: java.net.ConnectException: 连接超时 (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(PatchedSftpFileSystem.java:57)
... 14 more
Caused by: com.jcraft.jsch.JSchException: Session.connect: java.net.ConnectException: 连接超时 (Connection timed out)
at com.jcraft.jsch.Session.connect(Session.java:565)
at com.jcraft.jsch.Session.connect(Session.java:183)
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 sftp://ss1.sockgo.com:22/ in @5e048458
2019-03-18 17:00:32,915 [1060173] DEBUG - t.connections.RemoteConnection - File system of sftp://ss1.sockgo.com:22/ in @5e048458 is closed.

11 comments

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)?

0

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.

0

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 https://uploads.services.jetbrains.com/ and let me know the name of that file.

#com.intellij.ssh
#com.jetbrains.plugins.webDeployment

 

0

Sergey,

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.

0

Thanks!

Which Authentication type do you currently use?

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

0

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

0

Do you use any custom algorithms in ssh config?

What is your version of OpenSSH?

0

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

My OpenSSH is version 7.9p1.

0

Apparently it is related to https://youtrack.jetbrains.com/issue/PY-33521 since we do not yet support OpenSSH 7.8+
Try downgrading your OpenSSH

0

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

0

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.

0

Please sign in to leave a comment.