You need to write a script that would open the connection in a separate ssh process, and then redirect the I / O from there with minor changes to the console. those. I imagine this as some while loop that would redirect every (almost every) command to ssh and return an answer from there. It is necessary to do this using standard shell tools so that it runs on android busybox. (ssh utility is present) The main question is how to send commands to the child process and get an answer? Once again, the logic is:
running the command
ssh xxx@xx.xx.xx.xx ghcissh requires a password and I enter it, after which the ghci internal console starts
various haskell commands are entered
But the main problem is that not all commands need to be immediately transferred via ssh to ghci , and some must first be processed in a special way on the client side and only then transferred. Therefore, I think that the script needs to be made so that it creates a child process and connects to it, and in the main process performs user interaction and the transfer of commands / output to the child process.