I managed to read ssh verbose mode output with QProcess. But, like in the terminal, if ssh is successfully logged in, it will stop the process. But, in the terminal, I can see the verbose output if there are connections using ssh.
I make ssh for dynamic forwarding like this command:

ssh -vfCND31338 -l username -p 22 myhost

the problem is that QProcess will stop reading output when ssh successfully logged in. for the rest verbose, it doesn't read anymore. What should I do with this?

有帮助吗?

解决方案

I do not think this is possible off-hand with stock Qt, but e.g. you could poll with a certain interval if the ssh session is still running. In that case, pgrep is your friend.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top