import osproc
var p = startProcess("ssh", args = ["sshoptions", "myname@hostname", "command you want to run on the server"], options = {poUsePath, poParentStreams})
doAssert p.waitForExit == 0
If this code doesn't work for you, there are ssh related libraries: https://nimble.directory/search?query=ssh