Personally I'd do this the easy way and use the Qt-style API of the wrappers provided by libqxt, especially since they've already solved these issues for you. :-) http://libqxt.bitbucket.org/doc/tip/qxtsshclient.html Cheers Rich.