32 const char *
const user = argv[0];
33 const char *
const host = argv[1];
34 const uint16_t joedb_port = uint16_t(std::atoi(argv[2]));
35 const unsigned ssh_port = argc > 3 ? std::atoi(argv[3]) : 22;
36 const int ssh_log_level = argc > 4 ? std::atoi(argv[4]) : 0;
38 session = std::make_unique<ssh::Session>(user, host, ssh_port, ssh_log_level);
39 channel = std::make_unique<ssh::Forward_Channel>(*session,
"localhost", joedb_port);
42 connection = std::make_unique<Server_Connection>(*channel);
44 connection = std::make_unique<Server_File>(*channel);
45 connection->set_log(&std::cerr);