IntelliJ: database connections: ExecutionException: SSH: Failed to load Identity File
Answered
first post here:
When trying to test connections or connect to a database in IntelliJ IDEA that's been working previously, now getting:
"com.intellij.execution.ExecutionException: SSH: Failed to load identity file"
Was working in 2018.3.1.
Updated to 2018.3.2 to fix a separate issue but now this won't work.
Anybody have any ideas or suggestions? Should I be creating a ticket in youtrack?
Please sign in to leave a comment.
I have same issue. MacOS 10.14.1, PHPStorm 2018.3.2
What is the private key format? Could be the https://youtrack.jetbrains.com/issue/PY-24325 Please try https://youtrack.jetbrains.com/issue/PY-24325#focus=streamItem-27-3169574-0-0 (using the OpenSSH Config and authentication agent authentication type option).
If issue remains, please provide Details output from Test Connection button for the Data Source. Please also add
#com.intellij.sshinto Help | Debug Log Settings... restart IDE, reproduce the problem and attach idea.log after IDE restart and reproducing. Also please atatch screenshots of the connection settings (SSL/SSH tab).Hi Andrey,
I also should've mentioned that I'm seeing this issue on MacOS 10.14.2
Type RSA and bits set to 4096.
here's the command I used to generate the keys: ssh-keygen -t rsa -b 4096 -C "my email"
By details I'm assuming the "view" button after it fails? all it says is:
"com.intellij.execution.ExecutionException: SSH: Failed to load identity file."
Here's some info from the debug log with some data redacted.
Looks like the format is not supported. Please try this workaround as mentinoed. It should help.
Andrey,
Tried the workaround, not working. Giving me an "Error: SSH: Auth fail". Probably because our proxy host isn't configured to take ssh config and auth agent. Requires a username/password combination. Any other ideas to try?
thanks for your help.
Have you checked that it works from OS terminal? If it does not work from terminal this method will not work from IDE.
Figured it out. It was a missing key in one of our internal systems. 🤦♂️ Thanks again!
**Invalid**
```
-----BEGIN OPENSSH PRIVATE KEY-----
```
**Correct**
```
-----BEGIN RSA PRIVATE KEY-----
```
**Step to fix**
Remove old files
```
rm -rf ~/.ssh/*
```
Create new File (-m pem)
```
ssh-keygen -t rsa -b 2048 -m pem -f ~/.ssh/google_compute_engine -C username
```