[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

how to do ssh authentication using pam?



I need to execute a series of commands using ssh in c code like the
following, but I want to do authentication or input password only once in
the beginning. Will pam help in this case ? Please show some c code. Thank
you.


int main(int argc, char** argv)
{
  char* arg_list[] = {
    "ssh",
    "user@host",
    "ls",
    NULL
  };

  /* Now execute ssh */
  execvp("ssh", arg_list);

}








[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []