Shutdown remotly linux by qt app
-
Hi,
Like in topic. How shutdown remotly linux by qt app ? In my private network I have a linux Debian accesed from IP/SSH. -
@Damian7546 You can execute following command:
shutdown -h now
-
-
@Damian7546
Unless you are using QtRemoteObjects I don't think that is a Qt-related question. If you mean you can execute commands on the remote from the local viassh
then Qt'sQProcess
allows (local) OS commands to be run. -
@JonB I feel we don't understand each other.
I have a computer with ip address 192.168.1.50 with qt app. In this app I need write code which one will be shutdown the computer with Linux with ip addres: 192.168.1.51 ? It is possible ?How do this ? -
@Damian7546 Hi,
The most simple would be to use QProcess and use ssh to execute the command on the remote node.
-
@SGaist said in Shutdown remotly linux by qt app:
@Damian7546 Hi,
The most simple would be to use QProcess and use ssh to execute the command on the remote node.
Which is 100% what I said :)
@Damian7546
If you mean you can go into a shell and usessh
to invoke the shutdown command for a remote machine then you can do that from a Qt program viaQProcess
.If you mean anything else please clarify what you expect to do,.