SSH from HassOS to remote server to run script

I can’t seem to figure out how to generate ssh keys within HassIO to put on a remote server so I can run a little script (on HassIO) that will SSH into the remote server (using the key) to run a script there.

Does anybody know how to do this?

generate them on another computer.