-/**
- * Function to check if password-less SSH logins to given ip work
- *
- * @param host_str numeric representation of the host's ip
- * @return GNUNET_YES if password-less SSH login to the given host works;
- * GNUNET_NO if not
- */
-static int
-check_ssh (char *host_str)
-{
- char *const remote_args[] = {
- "ssh", "-o", "BatchMode=yes", "-o", "CheckHostIP=no", "-q",
- host_str, "echo", "SSH", "works", NULL
- };
- struct GNUNET_OS_Process *auxp;
- enum GNUNET_OS_ProcessStatusType type;
- unsigned long code;
- int ret;
-
- auxp =
- GNUNET_OS_start_process_vap (GNUNET_NO, GNUNET_OS_INHERIT_STD_ALL, NULL,
- NULL, "ssh", remote_args);
- GNUNET_assert (NULL != auxp);
- do
- {
- ret = GNUNET_OS_process_status (auxp, &type, &code);
- GNUNET_assert (GNUNET_SYSERR != ret);
- (void) usleep (300);
- }
- while (GNUNET_NO == ret);
- (void) GNUNET_OS_process_wait (auxp);
- GNUNET_OS_process_destroy (auxp);
- return (0 != code) ? GNUNET_NO : GNUNET_YES;
-}
-
-