SSH with E-Mail as Username?
Answered
My company uses AAD for single-sign-on, and the SSH credentials that come with that use the user's e-mail as the SSH user name.
SSH in IDEA seems to connect like this: `user@example.org@node-02.example.org`.
This fails, probably since it gets confused about which `@` denotes the host.
On the terminal, that's not a problem since you can write the user name into the configuration. While IDEA respects the configuration, it requires that you enter an user name in the SSH profile anyway, and that leads to an authentication error.
Is anyone aware of a way to make this work?
Please sign in to leave a comment.
It should work fine as you can specify the user name separately in IntelliJ IDEA SSH connection settings.
Check idea.log for the actual error, see https://intellij-support.jetbrains.com/hc/en-us/articles/207241085.
Here's how the Profile is set up:

Hitting the ‘test connection’ button, this is what's written to idea.log.
The Host and the user name are parsed correctly, but the connection is dropped by the server.
To get more details, check the server logs.
You can also add the following in Help | Diagnostic Tools | Debug Log Settings and check idea.log for more details:
You will see what user name and host IDE is using in the log.
With the additional Debug Params, this is what I get in idea.log. If I'm reading it right, IDEA tries to connect using nothing but my personal id
proudone@not-example.org
, rather than the ID specified in my ssh config..ssh/config:
The server log contains no related lines, not even a connection hint.
Are you sure the log provided corresponds to the screenshot with your settings? We tried exactly the same setup and the log looks different.
You have this in the log:
But with the configuration from your screenshot, we get this:
What IDE version do you use?
If it's just the result of the incorrect log edit and it still doesn't work, this is likely the root cause: https://youtrack.jetbrains.com/issue/IDEA-271669/Support-CertificateFile-directive-in-ssh-config-file.
It has nothing to do with the email used as the user name.
Yes, I incorrectly redacted the log. The bug you linked looks extremely relevant. Thank you!