IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39280


Ignore:
Timestamp:
Dec 16, 2015, 10:10:37 AM (11 years ago)
Author:
eugene
Message:

add ssh option to prevent password request (better to just fail); remove deprecated rconnect copies

Location:
trunk/Ohana/src
Files:
3 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libohana/src/rconnect.c

    r33963 r39280  
    2222/* connection can take a while, allow up to 5 sec by default */
    2323static int CONNECT_TIMEOUT = 5000;
     24static char *CONNECT_FLAGS = NULL;
    2425
    2526void rconnect_set_timeout (int timeout) {
    2627  CONNECT_TIMEOUT = timeout;
     28}
     29
     30void rconnect_set_flags (char *flags) {
     31  CONNECT_FLAGS = flags;
    2732}
    2833
     
    5257  if (pipe (stderr_fd) < 0) goto pipe_error;
    5358
    54   char *flag = "-x";
     59  // make this a user option?
     60  // char *flag = "-x -o PasswordAuthentication=No";
    5561
    56   ALLOCATE (argv, char *, 5);
     62  ALLOCATE (argv, char *, 7);
    5763  argv[0] = command;
    58   argv[1] = flag;
    59   argv[2] = hostname;
    60   argv[3] = shell;
    61   argv[4] = 0;
     64  argv[1] = "-x";
     65  argv[2] = "-o";
     66  argv[3] = "PasswordAuthentication=No";
     67  argv[4] = hostname;
     68  argv[5] = shell;
     69  argv[6] = 0;
    6270
    6371  pid = fork ();
Note: See TracChangeset for help on using the changeset viewer.