QTCreator 12.0.2 Keeps asking ssh username and password everytime
-
Hi all,
Although I set Authentication type as "Specific Key", created a key pair and deployed public key to te remote device, when I run my app using QtCreator it keeps asking password (using qtc-askpass) for every step (every connection attempt). Where should I start checking things? Thank you in advance.
-
@Serhan-Kars What are your settings for that device exactly? Is "Specific key" definitely selected? Did you point "Private key file:" in the device settings to the right private key? Is it the correct device (in case you have intentionally or accidentally multiple remote Linux devices set up)? Did you change the setting for the user name after deploying the public key? On your device, does /home/<username>/.ssh/authorized_keys contain the correct public key? Can you log into your device as the user given in the device settings from a Terminal, without giving your password (potentially passing the private key, if you didn't use the standard one, "ssh -i <path_to_private_key> <username>@<device>")?
-
Thank you very much for your answer. My answer to all your questions is YES :)
@ziller said in QTCreator 12.0.2 Keeps asking ssh username and password everytime:
Is "Specific key" definitely selected?
YES
Did you point "Private key file:" in the device settings to the right private key?
YES
Is it the correct device (in case you have intentionally or accidentally multiple remote Linux devices set up)?
YES I have only one. I can run remotely run the app using Qt Creator . It just asks password/
Did you change the setting for the user name after deploying the public key?
NO
On your device, does /home/<username>/.ssh/authorized_keys contain the correct public key?
YES. Checked it once again.
Can you log into your device as the user given in the device settings from a Terminal, without giving your password (potentially passing the private key, if you didn't use the standard one, "ssh -i <path_to_private_key> <username>@<device>")?
YES. I could connect using the private key of the pair that I created using QtCreator
and "ssh -i <path_to_private_key> <username>@<device> command -
You could get some logging for Qt Creator.
Either from Qt Creator itself via Tools > Debug Qt Creator > Show Logs... or by setting the environment variable
QT_LOGGING_RULES=qtc*=true
before starting qtcreator (on Windows you need something like DebugView to view the output). -
@cristian-adam Thank you @cristian-adam.
I turned on the debugging and saw that for ssh connections Qt Creator do not use the private key ( the -i option):
11:20:43.056 qtc.utils.process: Process 59 starting (non blocking): C:\Windows\System32\OpenSSH\ssh.exe -q -o "StrictHostKeyChecking=no" -o "Port=22" -o "User=root" -o "BatchMode=no" 169.254.1.1 "{SOME COMMANDS}"
But below you can see I chose Specific Key.
My device is set as default for Remote Linux.
Now I think the next step is to make Qt Creator use the private key. Any help would be appreciated.
-
@Serhan-Kars Heeyy!!! Found it. I think it is a bug of Qt Creator.
My case was:
I created an additional device. "Set as default device". It has "Specific Key" selected as "Authentication type"To solve the issue I have deleted other devices defined.
So as a conclusion I think we can say Qt Creator still uses other devices' settings even if you set a device as default.
Thank you both @ziller and @cristian-adam
-
S Serhan Kars has marked this topic as solved on