I have the public key available to me in the database.
How about using the child_process module?
const {spawn} = require('child_process') const proc = spawn('ssh', ['example.com', 'cmd to run']) ...
Why don't you create a simple REST api using node and make a call to that api whenever you want to run a script. Assuming you want to run python script, you can use library below.
You may want to look into a high-level ssh based automation solution like Shipit.
If you are looking for something minimal, you can refer to this implementation.
Why node?
Update:
I use http://mobaxterm.mobatek.net/
Benefits:
Drawbacks:
Seth Bergman
Full Stack Engineer
It just so happens that I've written a blog post on this very topic. The short answer is, in your terminal:
cat tmp/codeship_projectname.pub | ssh root@dokkuinstance.com "sudo sshcommand acl-add dokku codeship_projectname"#!/bin/sh git fetch --unshallow || true git fetch origin "+refs/heads/*:refs/remotes/origin/*" # checkout a remote branch with # git checkout -b test origin/test git remote add dokku dokku@dokkuinstance.com:projectname git push dokku masterHere's the full tutorial onCONTINUOUS DEPLOYMENT WITH CODESHIP AND DOKKUblog.sethbergman.com/continuous-deployment-with-c…