Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QtCreator and Linux Device: SSH Connection Failure
Forum Update on Monday, May 27th 2025

QtCreator and Linux Device: SSH Connection Failure

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
12 Posts 6 Posters 7.0k 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.
  • W Offline
    W Offline
    webzoid
    wrote on 18 Jul 2018, 10:27 last edited by
    #1

    Hi,

    I'm trying to solve a problem when attempting to test the connection between my Debian host and a Linux-based device.

    When clicking the test button, the following error is reported by QtCreator and I can't figure out how to resolve it:

    SSH connection failure: SSH Protocol error: Server sent unexpected SSH_MSG_USERAUTH_PK_OK packet.
    

    The connection between QtCreator and the target is set to use a password (the device login is just root with no password) and this used to work on older versions of QtCreator.

    Any suggestions please?

    I've attempted to use a Key for authentication but when I attempt to copy the key file across to the target via the terminal (using ssh-copy-id), I get a warning saying that keys already exist on the target but this does not seem to be the case.

    J 1 Reply Last reply 18 Jul 2018, 10:30
    0
    • W webzoid
      18 Jul 2018, 10:27

      Hi,

      I'm trying to solve a problem when attempting to test the connection between my Debian host and a Linux-based device.

      When clicking the test button, the following error is reported by QtCreator and I can't figure out how to resolve it:

      SSH connection failure: SSH Protocol error: Server sent unexpected SSH_MSG_USERAUTH_PK_OK packet.
      

      The connection between QtCreator and the target is set to use a password (the device login is just root with no password) and this used to work on older versions of QtCreator.

      Any suggestions please?

      I've attempted to use a Key for authentication but when I attempt to copy the key file across to the target via the terminal (using ssh-copy-id), I get a warning saying that keys already exist on the target but this does not seem to be the case.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 18 Jul 2018, 10:30 last edited by
      #2

      @webzoid said in QtCreator and Linux Device: SSH Connection Failure:

      I get a warning saying that keys already exist on the target

      You can try to remove it like shown here https://askubuntu.com/questions/317619/how-to-undo-an-ssh-copy-id

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      W 1 Reply Last reply 18 Jul 2018, 10:32
      1
      • J jsulm
        18 Jul 2018, 10:30

        @webzoid said in QtCreator and Linux Device: SSH Connection Failure:

        I get a warning saying that keys already exist on the target

        You can try to remove it like shown here https://askubuntu.com/questions/317619/how-to-undo-an-ssh-copy-id

        W Offline
        W Offline
        webzoid
        wrote on 18 Jul 2018, 10:32 last edited by
        #3

        @jsulm Thanks for your quick reply.

        Where would the key live? I've looked in /home/user/.ssh/ but the directory doesn't exist.

        I've also tried clicking the "Deploy Public Key" button in the Devices window but the server rejected key message just appears.

        J 1 Reply Last reply 18 Jul 2018, 10:33
        0
        • W webzoid
          18 Jul 2018, 10:32

          @jsulm Thanks for your quick reply.

          Where would the key live? I've looked in /home/user/.ssh/ but the directory doesn't exist.

          I've also tried clicking the "Deploy Public Key" button in the Devices window but the server rejected key message just appears.

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 18 Jul 2018, 10:33 last edited by
          #4

          @webzoid It does not exist? Did you ever log-in via SSH as this user?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          W 1 Reply Last reply 18 Jul 2018, 10:34
          0
          • J jsulm
            18 Jul 2018, 10:33

            @webzoid It does not exist? Did you ever log-in via SSH as this user?

            W Offline
            W Offline
            webzoid
            wrote on 18 Jul 2018, 10:34 last edited by webzoid
            #5

            @jsulm Yes, I can log in via ssh into the system via the USB RNDIS adapter (and also ethernet but the former is more accessible in this device) and it works fine

            UPDATE
            If I wind QtCreator back to version 4.3.0 then everything works just fine - it would appear that this is a new feature in later versions?

            ANOTHER UPDATE
            If I attempt to ssh into the target using ssh -l root 192.168.11.1 then as soon as the connection is made, it is closed again with the following:

            ERROR: Connection to 192.168.11.1 closed by the remote host.
            

            Having done some more searching, there is mention of an ssh-agent however this does not exist on the target.

            @jsulm Is this required at all?

            A 1 Reply Last reply 18 Jul 2018, 17:53
            0
            • W webzoid
              18 Jul 2018, 10:34

              @jsulm Yes, I can log in via ssh into the system via the USB RNDIS adapter (and also ethernet but the former is more accessible in this device) and it works fine

              UPDATE
              If I wind QtCreator back to version 4.3.0 then everything works just fine - it would appear that this is a new feature in later versions?

              ANOTHER UPDATE
              If I attempt to ssh into the target using ssh -l root 192.168.11.1 then as soon as the connection is made, it is closed again with the following:

              ERROR: Connection to 192.168.11.1 closed by the remote host.
              

              Having done some more searching, there is mention of an ssh-agent however this does not exist on the target.

              @jsulm Is this required at all?

              A Offline
              A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on 18 Jul 2018, 17:53 last edited by
              #6

              @webzoid

              I had ssh connection problems with some version combinations of ssh client and server. especially root logins are default disabled in newer ssh servers and must be enabled first. password logins were disabled in some cases too.

              you will need to investigate deeper...

              Qt has to stay free or it will die.

              W 1 Reply Last reply 19 Jul 2018, 06:50
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 18 Jul 2018, 19:35 last edited by
                #7

                Hi,

                There's a bug report related to that message.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                1
                • A aha_1980
                  18 Jul 2018, 17:53

                  @webzoid

                  I had ssh connection problems with some version combinations of ssh client and server. especially root logins are default disabled in newer ssh servers and must be enabled first. password logins were disabled in some cases too.

                  you will need to investigate deeper...

                  W Offline
                  W Offline
                  webzoid
                  wrote on 19 Jul 2018, 06:50 last edited by
                  #8

                  @aha_1980 My investigations continue. There is some bizarre behaviour going on with the Angstrom target - a lot of ssh features or commands don't seem to be present - even though I can ssh into the thing. For example ssh-agent, ssh-add, etc are not present. I think when time allows, I'll push over to using Ubuntu on the target and forget about the current deployment.

                  @SGaist Already spotted the bug report which was closed a while back. However, no work around had been suggested for it.

                  A 1 Reply Last reply 19 Jul 2018, 06:55
                  0
                  • W webzoid
                    19 Jul 2018, 06:50

                    @aha_1980 My investigations continue. There is some bizarre behaviour going on with the Angstrom target - a lot of ssh features or commands don't seem to be present - even though I can ssh into the thing. For example ssh-agent, ssh-add, etc are not present. I think when time allows, I'll push over to using Ubuntu on the target and forget about the current deployment.

                    @SGaist Already spotted the bug report which was closed a while back. However, no work around had been suggested for it.

                    A Offline
                    A Offline
                    aha_1980
                    Lifetime Qt Champion
                    wrote on 19 Jul 2018, 06:55 last edited by
                    #9

                    @webzoid said in QtCreator and Linux Device: SSH Connection Failure:

                    @SGaist Already spotted the bug report which was closed a while back. However, no work around had been suggested for it.

                    As the bug is fixed, you don't need a workaround :)

                    For example ssh-agent, ssh-add, etc are not present. I think when time allows, I'll push over to using Ubuntu on the target and forget about the current deployment. We use Angstrom on our Apalis iMX6 too, and deploying from Creator work - we just can't debug on target, but that's another story ;)

                    Ok, but they are not needed everyday - maybe they are just missing to save flash space.

                    even though I can ssh into the thing

                    So connecting by command line works? Even with public key? I just don't work from Creator?

                    Qt has to stay free or it will die.

                    1 Reply Last reply
                    0
                    • Cleiton BuenoC Offline
                      Cleiton BuenoC Offline
                      Cleiton Bueno
                      wrote on 20 Jul 2018, 16:16 last edited by
                      #10

                      Open a terminal and test ssh connection from Debian(Host) to Target with --verbose as:

                      ssh -vvv root@ip

                      If you can, put the output here.


                      Cleiton Bueno

                      Blog | Linkedin | B2Open

                      G 1 Reply Last reply 1 Dec 2020, 20:29
                      2
                      • Cleiton BuenoC Cleiton Bueno
                        20 Jul 2018, 16:16

                        Open a terminal and test ssh connection from Debian(Host) to Target with --verbose as:

                        ssh -vvv root@ip

                        If you can, put the output here.


                        Cleiton Bueno

                        Blog | Linkedin | B2Open

                        G Offline
                        G Offline
                        Gokulnath
                        wrote on 1 Dec 2020, 20:29 last edited by
                        #11

                        @Cleiton-Bueno ,
                        I tried to install Qt Creator trying to connect with my target Linux board as target device,
                        I made static IP for target device and tried in terminal with this command a you suggested. I have attached snapshot of error it is showing. Please help me with this.
                        Thanks
                        Gokul.
                        SSHconnectionFailure_2.JPG SSHConnectionFailure.JPG

                        A 1 Reply Last reply 2 Dec 2020, 07:35
                        0
                        • G Gokulnath
                          1 Dec 2020, 20:29

                          @Cleiton-Bueno ,
                          I tried to install Qt Creator trying to connect with my target Linux board as target device,
                          I made static IP for target device and tried in terminal with this command a you suggested. I have attached snapshot of error it is showing. Please help me with this.
                          Thanks
                          Gokul.
                          SSHconnectionFailure_2.JPG SSHConnectionFailure.JPG

                          A Offline
                          A Offline
                          aha_1980
                          Lifetime Qt Champion
                          wrote on 2 Dec 2020, 07:35 last edited by
                          #12

                          Hi @Gokulnath,

                          • how is your target connected to your computer?
                          • which IP address does your Linux machine have?
                          • it seems your Linux runs inside VirtualBox, how is the virtual network configured (bridged, NAT, ...)?

                          Regards

                          Qt has to stay free or it will die.

                          1 Reply Last reply
                          0

                          • Login

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