ExecutionException: SSH: Auth fail

Answered

When i try to conect to MySQL over SSH i get "SSH: Auth fail" but the credentials are correct becouse i can connect from terminal perfectly.

the idea.log fail says

2017-01-07 10:10:03,351 [ 50039] WARN - lij.database.util.ErrorHandler - SSH: Auth fail
com.intellij.execution.ExecutionException: SSH: Auth fail
at com.intellij.execution.rmi.RemoteProcessSupport.acquire(RemoteProcessSupport.java:159)
at com.intellij.database.console.JdbcDriverManagerImpl.getDriver(JdbcDriverManagerImpl.java:116)
at com.intellij.database.dataSource.LocalDataSource.getConnection(LocalDataSource.java:330)
at com.intellij.database.dataSource.LocalDataSource.getConnection(LocalDataSource.java:325)
at com.intellij.database.dataSource.LocalDataSource.performJdbcOperation(LocalDataSource.java:1344)
at com.intellij.database.dataSource.LocalDataSource.refreshMetaData(LocalDataSource.java:1149)
at com.intellij.database.dataSource.DataSourceUiUtil$RefreshTask.run(DataSourceUiUtil.java:530)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:710)
at com.intellij.openapi.progress.impl.CoreProgressManager$11.run(CoreProgressManager.java:423)
at com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:179)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:568)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:519)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:164)
at com.intellij.openapi.application.impl.ApplicationImpl.a(ApplicationImpl.java:572)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:309)
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)

 

25 comments
Comment actions Permalink
Official comment

As a temporary workaround you need to specify `Auth type` as `OpenSSH config and authentication agent` and load your keys into agent:

 

If there is still the issue, could you try to reproduce it with the latest DataGrip 2019.2 EAP and specify your case in https://youtrack.jetbrains.com/issue/IDEA-216202?

Comment actions Permalink

Hi,

Could you provide your datasource SSH settings screen shot?

Thank you.

0
Comment actions Permalink

I have the same problem

0
Comment actions Permalink

Same problem. DataGrip is not usable because of this

0
Comment actions Permalink

@vasily chernov ssh tunnels fail since 2016. Why is this such a problem to fix them? Simple and free sequel pro has no a single issue with this.

1
Comment actions Permalink

@Terion Hi,

Enhanced SSH functionality will be available in DataGrip 2017.3.
Thank you.

0
Comment actions Permalink

@vasily chernov

2017.3 is out

weeeell.... stack trace is now shorter. big progress

0
Comment actions Permalink

@Terion Hi,

Could you attach full IDE log? Do you ssh agent?

Thank you.

 

0
Comment actions Permalink

Same problem.

DataGrip 2017.3.3
Build #DB-173.4127.18, built on December 19, 2017
Licensed to DataGrip Evaluator
Expiration date: January 26, 2018
JRE: 1.8.0_152-release-1024-b8 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.13.2

I use ssh-agent.

com.jcraft.jsch.JSchException: Auth cancel
at com.jcraft.jsch.Session.connect(Session.java:518)
at com.jcraft.jsch.Session.connect(Session.java:183)
at com.intellij.ssh.SshConnectionUtil.createSshSession(SshConnectionUtil.kt:143)
at com.intellij.ssh.impl.SshConnection.a(SshConnection.kt:84)
at com.intellij.ssh.impl.SshConnection.getSshSession(SshConnection.kt:73)
at com.intellij.ssh.SshConnectionService.connect(SshConnectionService.kt:136)
at com.intellij.ssh.Ssh.a(ssh.kt:204)
at com.intellij.ssh.Ssh.access$connect(ssh.kt:1)
at com.intellij.ssh.ConnectionBuilder.connect(ssh.kt:87)
at com.intellij.database.dataSource.DataSourceSshTunnelConfiguration.createSshSession(DataSourceSshTunnelConfiguration.java:211)
at com.intellij.database.dataSource.DataSourceSshTunnelConfiguration.createTunnel(DataSourceSshTunnelConfiguration.java:141)
at com.intellij.database.console.JdbcDriverManagerImpl.createTunnel(JdbcDriverManagerImpl.java:177)
at com.intellij.database.console.JdbcDriverManagerImpl.access$000(JdbcDriverManagerImpl.java:35)
at com.intellij.database.console.JdbcDriverManagerImpl$1.getRunProfileState(JdbcDriverManagerImpl.java:78)
at com.intellij.database.console.JdbcDriverManagerImpl$1.getRunProfileState(JdbcDriverManagerImpl.java:44)
at com.intellij.execution.rmi.RemoteProcessSupport.a(RemoteProcessSupport.java:213)
at com.intellij.execution.rmi.RemoteProcessSupport.acquire(RemoteProcessSupport.java:143)
at com.intellij.database.console.JdbcDriverManagerImpl.getDriver(JdbcDriverManagerImpl.java:128)
at com.intellij.database.dataSource.DatabaseConnectionEstablisher.lambda$establishConnection$1(DatabaseConnectionEstablisher.java:56)
at com.intellij.database.dataSource.AsyncUtil.lambda$null$4(AsyncUtil.java:49)
at com.intellij.database.dataSource.AsyncUtil.lambda$underProgress$14(AsyncUtil.java:127)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:495)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.database.dataSource.AsyncUtil.underProgress(AsyncUtil.java:133)
at com.intellij.database.dataSource.AsyncUtil.underProgress(AsyncUtil.java:127)
at com.intellij.database.dataSource.AsyncUtil.lambda$captureIndicator$5(AsyncUtil.java:49)
at java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:981)
at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2124)
at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:110)
at com.intellij.database.dataSource.DatabaseConnectionEstablisher.establishConnection(DatabaseConnectionEstablisher.java:53)
at com.intellij.database.dataSource.DatabaseConnectionManager$Executor.supplyAsync(DatabaseConnectionManager.java:381)
at com.intellij.database.dataSource.DatabaseConnectionManager$Executor.createInner(DatabaseConnectionManager.java:321)
at com.intellij.database.dataSource.DatabaseConnectionManager$Executor.lambda$sync$2(DatabaseConnectionManager.java:301)
at com.intellij.database.dataSource.AsyncUtil.withAsyncFriendly(AsyncUtil.java:159)
at com.intellij.database.dataSource.DatabaseConnectionManager$Executor.sync(DatabaseConnectionManager.java:298)
at com.intellij.database.dataSource.DatabaseConnectionManager$Builder.sync(DatabaseConnectionManager.java:112)
at com.intellij.database.dataSource.DataSourceSyncManager.lambda$static$1(DataSourceSyncManager.java:39)
at com.intellij.database.dataSource.DataSourceSyncManager$SyncProcessor$1.perform(DataSourceSyncManager.java:242)
at com.intellij.database.dataSource.DatabaseModelLoader$IntrospectionSession.updateDatabaseInfo(DatabaseModelLoader.java:283)
at com.intellij.database.dataSource.DatabaseModelLoader$IntrospectionSession.run(DatabaseModelLoader.java:266)
at com.intellij.database.dataSource.DataSourceSyncManager$SyncProcessor.performSync(DataSourceSyncManager.java:244)
at com.intellij.database.dataSource.AsyncUtil.lambda$null$6(AsyncUtil.java:55)
at com.intellij.database.dataSource.AsyncUtil.lambda$underProgress$14(AsyncUtil.java:127)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:543)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:488)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.database.dataSource.AsyncUtil.underProgress(AsyncUtil.java:133)
at com.intellij.database.dataSource.AsyncUtil.underProgress(AsyncUtil.java:127)
at com.intellij.database.dataSource.AsyncUtil.lambda$captureIndicator$7(AsyncUtil.java:55)
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
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) (no stack trace).
com.intellij.execution.ExecutionException

How to get full IDE log?

0
Comment actions Permalink

By the way. Setting "Auth type" to option "OpenSSH config and authentication agent" helps in my case

1
Comment actions Permalink

@ Pablo Nuñez Hi,

Do you connect with root@159.203.106.23 user? Try with root only.

Thank you.

-1
Comment actions Permalink

@vasily chernov

I've already opened a ticket in your bug tracker and already asked you about how to get this log =)

1
Comment actions Permalink

@Terion what is the ticket id?

0
Comment actions Permalink

Our office started getting the `jcraft.jsch.JSchException: Auth fail` exception today. I don't know if this is related to the original poster's problem, but we found re-entering SSH key passwords restored functionality.

1
Comment actions Permalink

Reentering ssh key worked for me as well. Thanks @Mike Heyns!

0
Comment actions Permalink

I ran into this after updating macOS. Re-adding key to ssh-agent worked for me:

ssh-add -K ~/.ssh/id_rsa
6
Comment actions Permalink

Using PyCharm with same error. But as Ben suggested, moving key to ssh-agent, and then modifying settings in PyCharm to use ssh-agent instead of OpenSSH pair worked.

0
Comment actions Permalink

Thanks Ben, re-adding key worked for me.

0
Comment actions Permalink

I have the same problem. I can connect successfully with Putty but couldn't via IntelliJ.

0
Comment actions Permalink

It is ridiculous, I can connect via the terminal coming with IntelliJ by ssh username@host.com, but I could not connect by "Start SSH session" also could not connect via Database explorer. (I am using the option "OpenSSH config and authentication agent")

Stack trace producing from "Start SSH session"

com.intellij.remote.RemoteSdkException: Auth fail
    at com.jetbrains.plugins.remotesdk.console.SshTerminalDirectRunner.createShellChannel(SshTerminalDirectRunner.java:60)
    at com.jetbrains.plugins.remotesdk.console.SshTerminalCachingRunner.getShellChannel(SshTerminalCachingRunner.java:38)
    at com.jetbrains.plugins.remotesdk.console.SshTerminalCachingRunner.connect(SshTerminalCachingRunner.java:29)
    at com.jetbrains.plugins.remotesdk.console.RunSshConsoleAction.createTerminalSession(RunSshConsoleAction.java:77)
    at com.jetbrains.plugins.remotesdk.console.RunSshConsoleAction.access$000(RunSshConsoleAction.java:23)
    at com.jetbrains.plugins.remotesdk.console.RunSshConsoleAction$1.run(RunSshConsoleAction.java:63)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:731)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:586)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:86)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
    at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:403)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311)
    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:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: com.intellij.ssh.SshTransportException: Auth fail
    at com.intellij.ssh.impl.SshConnection.a(SshConnection.kt:134)
    at com.intellij.ssh.impl.SshConnection.openChannel(SshConnection.kt:68)
    at com.intellij.ssh.SshConnectionService.a(SshConnectionService.kt:186)
    at com.intellij.ssh.SshConnectionService.shell(SshConnectionService.kt:173)
    at com.intellij.ssh.ShellChannelBuilder.openChannel(ssh.kt:224)
    at com.intellij.ssh.ShellChannelBuilder.openChannel$default(ssh.kt:220)
    at com.intellij.ssh.ShellChannelBuilder.openChannel(ssh.kt)
    at com.jetbrains.plugins.remotesdk.console.SshTerminalDirectRunner.createShellChannel(SshTerminalDirectRunner.java:57)
    ... 18 more
Caused by: com.jcraft.jsch.JSchException: Auth fail
    at com.jcraft.jsch.Session.connect(Session.java:519)
    at com.jcraft.jsch.Session.connect(Session.java:183)
    at com.intellij.ssh.impl.SshConnection.b(SshConnection.kt:156)
    at com.intellij.ssh.impl.SshConnection.a(SshConnection.kt:124)
    ... 25 more
0
Comment actions Permalink

@R Donuk,

Thank you for stack trace.


Do you load your keys into ssh agent?
Could you specify signing algorithm for your ssh keys?

0
Comment actions Permalink

I am having the same issue - is there a resolution for this? 

 

 

0
Comment actions Permalink

@Alan Quach,

The same questions for you:

  1. Do you load ssh keys into ssh agent?
  2. What is ssh keys signing algorithm?
0

Please sign in to leave a comment.