Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QTCreator 12.0.2 Keeps asking ssh username and password everytime
Forum Updated to NodeBB v4.3 + New Features

QTCreator 12.0.2 Keeps asking ssh username and password everytime

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
6 Posts 3 Posters 903 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Serhan KarsS Offline
    Serhan KarsS Offline
    Serhan Kars
    wrote on last edited by
    #1

    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.

    Z 1 Reply Last reply
    0
    • Serhan KarsS Serhan Kars

      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.

      Z Offline
      Z Offline
      ziller
      wrote on last edited by ziller
      #2

      @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>")?

      Serhan KarsS 1 Reply Last reply
      0
      • Z ziller

        @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>")?

        Serhan KarsS Offline
        Serhan KarsS Offline
        Serhan Kars
        wrote on last edited by
        #3

        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

        cristian-adamC 1 Reply Last reply
        0
        • Serhan KarsS Serhan Kars

          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

          cristian-adamC Offline
          cristian-adamC Offline
          cristian-adam
          wrote on last edited by
          #4

          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).

          Serhan KarsS 1 Reply Last reply
          0
          • cristian-adamC cristian-adam

            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).

            Serhan KarsS Offline
            Serhan KarsS Offline
            Serhan Kars
            wrote on last edited by
            #5

            @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.

            455ac72b-c66e-4739-8007-27c1907e2ca3-image.png

            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 KarsS 1 Reply Last reply
            0
            • Serhan KarsS Serhan Kars

              @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.

              455ac72b-c66e-4739-8007-27c1907e2ca3-image.png

              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 KarsS Offline
              Serhan KarsS Offline
              Serhan Kars
              wrote on last edited by
              #6

              @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

              1 Reply Last reply
              1
              • Serhan KarsS Serhan Kars has marked this topic as solved on

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved