Skip to content

Instantly share code, notes, and snippets.

@rissem
Created July 11, 2013 19:31
Show Gist options
  • Save rissem/5978496 to your computer and use it in GitHub Desktop.
Save rissem/5978496 to your computer and use it in GitHub Desktop.
SSH Tunnel in node.js
port = 8000
appPort = 3000
server = share.madeye.io
ssh_cmd = "ssh -v -tt -N -R #{port}:127.0.0.1:#{@appPort} -o StrictHostKeyChecking=no ubuntu@#{server}"
# console.log "COMMAND", ssh_cmd
exec ssh_cmd, (error, stdout, stderr) ->
console.log "ERROR", error
console.log "STDOUT", stdout
console.log "STDERR", stderr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment