#include <myssh.hpp>
Public Member Functions | |
Myssh () | |
int | connect_ssh (char *, char *, char *) |
void | disconnect_ssh () |
void | shell () |
int | auth_kbdint () |
QString | getErrMsg () |
QStringList | send_cmd (QString) |
bool | isConnected () |
Public Attributes | |
CHANNEL * | channel |
Private Member Functions | |
void | _lock () |
void | _unlock () |
QString | _getStdOut () |
QString | _getStdErr () |
Private Attributes | |
bool | connected |
SSH_SESSION * | session |
SSH_OPTIONS * | options |
bool | _isLocked |
QString | _errmsg |
Definition at line 36 of file myssh.hpp.
Myssh::Myssh | ( | ) | [inline] |
void Myssh::_lock | ( | ) | [private] |
Lock the access to this ssh connection
Definition at line 31 of file myssh.cpp.
References _isLocked.
Referenced by connect_ssh(), and send_cmd().
void Myssh::_unlock | ( | ) | [private] |
Unlock the access to this ssh connection
Definition at line 39 of file myssh.cpp.
References _isLocked.
Referenced by connect_ssh(), and send_cmd().
QString Myssh::_getStdOut | ( | ) | [private] |
Get the standard output
Definition at line 73 of file myssh.cpp.
References channel, and MYSSH_BUFFER_SIZE.
Referenced by send_cmd().
QString Myssh::_getStdErr | ( | ) | [private] |
Get the error output
Definition at line 99 of file myssh.cpp.
References channel, and MYSSH_BUFFER_SIZE.
Referenced by send_cmd().
int Myssh::connect_ssh | ( | char * | login, | |
char * | passwd, | |||
char * | host | |||
) |
void Myssh::disconnect_ssh | ( | ) |
Disconnect
Definition at line 192 of file myssh.cpp.
References connected, and session.
Referenced by MainWindowImpl::connectDisconnectSSH().
void Myssh::shell | ( | ) |
Request a shell
Definition at line 123 of file myssh.cpp.
References _errmsg, cfmakeraw(), channel, session, and terminal.
Referenced by connect_ssh().
int Myssh::auth_kbdint | ( | ) |
QString Myssh::getErrMsg | ( | ) | [inline] |
QStringList Myssh::send_cmd | ( | QString | s | ) |
Send a command to ssh host
s | command to send |
Definition at line 49 of file myssh.cpp.
References _getStdErr(), _getStdOut(), _lock(), _unlock(), and channel.
Referenced by SSHExecuteThread::run(), and JobExecute::run().
bool Myssh::isConnected | ( | ) | [inline] |
Definition at line 59 of file myssh.hpp.
References connected.
Referenced by MainWindowImpl::connectDisconnectSSH(), JobEditorWidget::executeJob(), Stats::refresh(), PBSNodes::refresh(), and SSHConnect::run().
bool Myssh::connected [private] |
Definition at line 39 of file myssh.hpp.
Referenced by connect_ssh(), disconnect_ssh(), isConnected(), and Myssh().
SSH_SESSION* Myssh::session [private] |
Definition at line 40 of file myssh.hpp.
Referenced by auth_kbdint(), connect_ssh(), disconnect_ssh(), and shell().
SSH_OPTIONS* Myssh::options [private] |
bool Myssh::_isLocked [private] |
QString Myssh::_errmsg [private] |
CHANNEL* Myssh::channel |
Definition at line 51 of file myssh.hpp.
Referenced by _getStdErr(), _getStdOut(), send_cmd(), and shell().