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. [SOLVED] ssh connection
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] ssh connection

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 6.5k Views 1 Watching
  • 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.
  • A Offline
    A Offline
    amban
    wrote on last edited by
    #1

    HI,
    I have written a bash script on my linux server and i want to display the resulting output in a dialog->textbrowser (Qt Creator in Windows platform).
    I see some posts discussing this issue but i am confused. Isnt there a simple in-built class solution to ssh using user name , password and then start process <QProcess> to grab the output ?

    Probable solutions i see otherwise are : libssh, LibQxt

    Thanks

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #2

      There is no builtin support for SSH as far as I know, so you probably should pick one of the libraries you suggested (Qxt might be easier to integrate, as it already provides some sort of Qt/QProcess-like interface).

      1 Reply Last reply
      0
      • A Offline
        A Offline
        amban
        wrote on last edited by
        #3

        Hi All,
        I fixed my problem temporarily. I had to make sure that i have access to both client/server via passkeys.
        And then all the we have to do is something simple as this :

        QProcess *proc = new QProcess();

        proc->start("ssh server_name /path/to/shell/script");
        proc->waitForFinished();

        QString result=proc->readAllStandardOutput();
        ui->textBrowser->setText(result); //writing the result to my text browser

        Thanks,
        Hope this helps.

        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