status of ssh using Qt
-
how to know status of ssh using Qt and if status is InActive , How to Active it using Qt.
@Amol-Mali Can you explain better? What SSH status do you mean and how is it related to Qt?
-
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?
-
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 ? -
Hi,
Do you mean you want to know whether the remote machine has an SSH server enabled before trying to connect to it ?
-
Hi,
Do you mean you want to know whether the remote machine has an SSH server enabled before trying to connect to it ?
-
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?
-
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?
-
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 .
Hi @Amol-Mali,
If your distro is using
systemd
(as Ubuntu 16.04 does), the easiest would be to query the manager about thesshd
status.You can do this by command line:
systemctl status sshd
and parsing the output, or better by one ofsystemd
s APIs (e.g. DBus).Regards
Reference: https://www.freedesktop.org/wiki/Software/systemd