tstSession.cc 497 Bytes
Newer Older
1
2
3
4
5
6
7
#include "gtest/gtest.h"

#include "rsmcore/sessionworker.hh"

using namespace rsm;
TEST(RSM, Session)
{
8
  SessionWorker session("warroom4");
9
10
11
12
13
14
  session.setLogVerbosity(SessionWorker::Verbosity::Functions);
  session.setPort(22);
  session.setUser("jap");
  session.connect();          // 1) hand-shake with host
  session.verifyKnownHost();  // 2) verify host is known/acceptable
  session.authenticate();     // 3) process authentication
15
  session.requestExec("ls -la");
16
17
  session.disconnect();
}