let scp_pull ssh ~src ~dest =
["scp"; ssh_batch_option ssh]
@ ssh.add_ssh_options
@ (match ssh.port with
| Some p -> ["-P"; "port"]
| None -> [])
@ (List.map src ~f:(fun src_item ->
match ssh.user with
| None -> fmt "%s:%s" ssh.address src_item
| Some u -> fmt "%s@%s:%s" u ssh.address src_item))
@ [dest]