Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt With SSH
Forum Update on Monday, May 27th 2025

Qt With SSH

Scheduled Pinned Locked Moved General and Desktop
9 Posts 8 Posters 27.4k 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.
  • T Offline
    T Offline
    tecknophreak
    wrote on 13 Aug 2010, 12:21 last edited by
    #1

    I'd like to integrate ssh into a -QT- Qt program. However, I like the way that QTcpSocket works. I've seen that you can't really use libssh2 with the QTcpSocket descriptor, since the QTcpSocket reads the stream before you can read it with the libssh2 read. Is there any way of doing this with just the standard QTcpSocket or does it have to be done in a class I create myself?

    Thanks

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on 13 Aug 2010, 14:14 last edited by
      #2

      Why do you want a QTcpSocket? I am sure libssh2 has some way to rrequest connections to a host. Why not just use what libssh2 provides?

      Maybe you can wrap it into some nice Qt-based class with an interface similar to QTcpSocket? But that is something you need to do yourself. At east I am not aware of a nice Qt-ish ssh library.

      1 Reply Last reply
      0
      • P Offline
        P Offline
        przemoc
        wrote on 27 Oct 2010, 23:08 last edited by przemoc
        #3

        You may look at the great LibQxt, an extension library for Qt. Recent development version (no stable one yet though) has some QxtSsh* classes (docs) using libssh2 internally. TBH I didn't have time to test it yet, but it should be working (or almost working at least).

        EDIT (2015-08-15): Fixed links.

        1 Reply Last reply
        0
        • X Offline
          X Offline
          xsacha
          wrote on 2 Jul 2011, 02:32 last edited by
          #4

          Bringing this up from the dead since I was interested in getting a Qt SSH client going.

          There exists a Qt SSH client here: http://qt-apps.org/content/show.php/qPutty?content=118372

          • Sacha
          1 Reply Last reply
          0
          • D Offline
            D Offline
            doubitchou
            wrote on 17 Oct 2011, 15:25 last edited by
            #5

            thanks xsacha, this helps.

            At the time of this post, the sources are in :

            "sourceforge":http://qputty.hg.sourceforge.net/hgweb/qputty/qputty

            1 Reply Last reply
            0
            • U Offline
              U Offline
              uranusjr
              wrote on 17 Oct 2011, 23:29 last edited by
              #6

              Since this is brought up, I have a question about qPutty. Does it work on Windows? I studied its source a bit, and it seems to use ssh.h. The original PuTTY wraps SSH in its own ssh.c/ssh.h, but I didn't see similar things in qPutty.

              I'm also interested in making Qt work with SSH. The easiest way is still LibQxt, although it contains a bit too much things other than SSH. Hopefully there can be a way to just have only SSH libs (and cross-platform).

              1 Reply Last reply
              0
              • Z Offline
                Z Offline
                zetaron
                wrote on 27 Nov 2011, 16:27 last edited by
                #7

                [quote author="uranusjr" date="1318894141"]The original PuTTY wraps SSH in its own ssh.c/ssh.h, but I didn't see similar things in qPutty.[/quote]

                You need the original putty source code.

                To compile the current (2011/11/27) version of qPutty you need the putty "pre-release":http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html (v0.62),
                place putty source outside of qPutty folder and do the compiling.

                1 Reply Last reply
                0
                • U Offline
                  U Offline
                  uranusjr
                  wrote on 3 Dec 2011, 07:20 last edited by
                  #8

                  Wow, thanks for the explanation! I'll look into it.

                  1 Reply Last reply
                  0
                  • N Offline
                    N Offline
                    nchokoev
                    wrote on 6 Aug 2013, 11:57 last edited by
                    #9

                    I've been using libssh2 with Qt build on MSVC2010.
                    Building libssh2 on MSVC2010 is very easy, just follow the instructions:
                    http://chaosstuff.com/build-libssh2-on-visual-studio-2010/

                    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