I am getting BAD_USE if I try to pass more than one command to execCommands. For instance, this works (in ghci):
> withSSH2 "/home/alex/.ssh/known_hosts" "/home/alex/.ssh/id_rsa.pub" "/home/alex/.ssh/id_rsa" "" "alex" "myserver" 22 $ flip execCommands ["whoami"]
(0,["alex\n"])
and this doesn't:
> withSSH2 "/home/alex/.ssh/known_hosts" "/home/alex/.ssh/id_rsa.pub" "/home/alex/.ssh/id_rsa" "" "alex" "myserver" 22 $ flip execCommands ["whoami", "whoami"]
*** Exception: BAD_USE
Am I doing anything wrong?
I am getting
BAD_USEif I try to pass more than one command toexecCommands. For instance, this works (in ghci):and this doesn't:
Am I doing anything wrong?