Cannot establish connection while opening project that uses Remote Linux host
Hi colleagues,
I am working with a project that uses Remote Linux host.
Every time opening this project, I get the message «CMake executable not found: /usr/bin/cmake Configure».
Then I turn to Build, Execution, Deployment > Toolchains.
My settings there are:
Remote Linux host
Credentials: ssh://yuri@192.168.253.129:22
Authentication type: Password
There I see the message «Cannot establish connection».
Ok I turn into Build, Execution, Deployment > Deployment.
Then I press the Test connection button. I am waiting a few seconds and get the message «Successfully connected to 192.168.253.129».
Returning to the Toolchain I see «Connected». After that I can work with the CMake.
My question is why it doesn't work automatically? Maybe I didn't set something up?
Toolchain "Remote Host" was created and configured by me. The corresponding Deployment settings were created automatically based on this Toolchain.
Best regards,
Yuri Markov
I am using CLion 2019.1.4, Windows 7, CentOS Linux release 7.6.1810
Please sign in to leave a comment.
Hi Yuri! Is the "Save password" option checked in the toolchain settings? Is the password saved or is it lost when you open the settings?
Hi Anna! Surely the first thing I checked was whether the "Save password" option is selected. When I open the settings, the password is displayed as dots. And I think its value is, as I have defined. At least I tried to save it again. Is there any hidden option here?
No, no hidden option, but, unfortunately, password might get lost in some cases although the option is enabled. Could you please open
File | Settings | Appearance & Behavior | System Settings | Passwordsand select to save the passwords in KeePass instead of a native Keychain, just in case? Does the issue still persist after that?Anna, it's good idea. I never opened this option before (because I am a beginner with the CLion).
And what I see there.
Save passwords:
(*) In KeePass
Database: C:\Users\Юра\.CLion2019.1\config\c.kdbx
( ) Do not save. . .
Ok, and how can I save my password here? "In KeePass" was just chosen ;)
Yuri,
Please do the following:
Does it help?
Thank you, Anna! You have really helped me. Your solution works good for me!
I think such long timeout is required because of my network.
My next question will be on how configure the Custom Build Targets :)
The program, external tool, which I define there (make for example), runs locally but not on remote host. Is it possible to run it on remote host?
I'm glad it helped!
Currently you can work only with CMake projects in the full remote mode: https://www.jetbrains.com/help/clion/remote-projects-support.html. Feel free to comment or upvote https://youtrack.jetbrains.com/issue/CPP-16202. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.
So I can't use External Tools with Full Remote Mode, is this true?
This link on help is what I used to configure my project.
Yes, that's true. And you can't work with Compilation Database projects in the full remote mode for now.
There are Remote SSH External Tools: https://www.jetbrains.com/help/clion/settings-tools-remote-ssh-external-tools.html. You can try configuring and using them to run a command over SSH.
It's wonderful, thank you very much for the information. I will try it.
I already found the CLion is a suitable tool for my work.
My problem was this: https://github.com/hierynomus/sshj/issues/380#issuecomment-344238830 and I solved it by doing this on my endpoint/server: https://unix.stackexchange.com/a/370716