+(* Make an SSH connection to the remote machine. *)
+(*
+let ssh_connect config =
+ let cmd = sprintf "ssh%s -l %s -p %s %s" XXXXX
+ (if config.ssh_compression then " -C" else "")
+ (quote config.ssh_username)
+ (quote config.ssh_port)
+ (quote config.ssh_host) in
+ eprintf "ssh_connect: %s\n%!" cmd;
+ let chan = open_process_out cmd in
+ descr_of_out_channel chan, chan
+
+let ssh_disconnect (_, chan) =
+ match close_process_out chan with
+ | WEXITED 0 -> () (* OK *)
+ | WEXITED i -> failwith (sprintf "ssh: exited with error code %d" i)
+ | WSIGNALED i -> failwith (sprintf "ssh: killed by signal %d" i)
+ | WSTOPPED i -> failwith (sprintf "ssh: stopped by signal %d" i)*)
+