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. status of ssh using Qt
QtWS25 Last Chance

status of ssh using Qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 4 Posters 1.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.
  • A Offline
    A Offline
    Amol Mali
    wrote on last edited by
    #1

    how to know status of ssh using Qt and if status is InActive , How to Active it using Qt.

    jsulmJ 1 Reply Last reply
    0
    • A Amol Mali

      how to know status of ssh using Qt and if status is InActive , How to Active it using Qt.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Amol-Mali Can you explain better? What SSH status do you mean and how is it related to Qt?

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

      1 Reply Last reply
      1
      • A Offline
        A Offline
        Amol Mali
        wrote on last edited by
        #3

        @jsulm

        SSH which is used to log on to remote system. i want to know the status of ssh using qt c++. is there any option?

        aha_1980A 1 Reply Last reply
        0
        • A Amol Mali

          @jsulm

          SSH which is used to log on to remote system. i want to know the status of ssh using qt c++. is there any option?

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Amol-Mali

          It's not clear what do you want to achive?

          Are you searching for something like QSsh?

          Regards

          Qt has to stay free or it will die.

          1 Reply Last reply
          1
          • A Offline
            A Offline
            Amol Mali
            wrote on last edited by
            #5

            @aha_1980

            i am using ubuntu 16.04 LTS . if i want to access another machine from my PC i use SSH Service in Terminal. i am trying to know the status of SSH service using Qt C++.
            for example-
            is SSH service is enable / disable on Particular PC ?
            is SSH Service is Active or Not ?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi,

              Do you mean you want to know whether the remote machine has an SSH server enabled before trying to connect to it ?

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

              A 1 Reply Last reply
              3
              • SGaistS SGaist

                Hi,

                Do you mean you want to know whether the remote machine has an SSH server enabled before trying to connect to it ?

                A Offline
                A Offline
                Amol Mali
                wrote on last edited by
                #7

                @SGaist

                Hi,

                No , I want to know that my own PC has SSH enabled or Not.?

                aha_1980A 1 Reply Last reply
                0
                • A Amol Mali

                  @SGaist

                  Hi,

                  No , I want to know that my own PC has SSH enabled or Not.?

                  aha_1980A Offline
                  aha_1980A Offline
                  aha_1980
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Amol-Mali

                  No , I want to know that my own PC has SSH enabled or Not.?

                  I don't think there is a reliable cross-platform solution for that. One way could be the sledgehammer by just trying to connect to localhost.

                  Out of curiosity: Why do you want to know that?

                  Qt has to stay free or it will die.

                  A 1 Reply Last reply
                  0
                  • aha_1980A aha_1980

                    @Amol-Mali

                    No , I want to know that my own PC has SSH enabled or Not.?

                    I don't think there is a reliable cross-platform solution for that. One way could be the sledgehammer by just trying to connect to localhost.

                    Out of curiosity: Why do you want to know that?

                    A Offline
                    A Offline
                    Amol Mali
                    wrote on last edited by
                    #9

                    @aha_1980

                    Actully i have multiple Machines. for every machine i need to check manually that SSH is installed or Not. is it Enable or Not.? so i am trying to build one Binary using Qt which will help me to know the status of SSH .

                    aha_1980A 1 Reply Last reply
                    0
                    • A Amol Mali

                      @aha_1980

                      Actully i have multiple Machines. for every machine i need to check manually that SSH is installed or Not. is it Enable or Not.? so i am trying to build one Binary using Qt which will help me to know the status of SSH .

                      aha_1980A Offline
                      aha_1980A Offline
                      aha_1980
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      Hi @Amol-Mali,

                      If your distro is using systemd (as Ubuntu 16.04 does), the easiest would be to query the manager about the sshd status.

                      You can do this by command line: systemctl status sshd and parsing the output, or better by one of systemds APIs (e.g. DBus).

                      Regards

                      Reference: https://www.freedesktop.org/wiki/Software/systemd

                      Qt has to stay free or it will die.

                      1 Reply Last reply
                      2

                      • Login

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