Hi. I am having doubts regarding using the ssh login to check the server status with child_process module. Is that something that you can help me with? Thanks.
child_process.exec("sshpass -p 'password' ssh username@hostname", (err, stdout, stderr) ->
if err
console.log(err)
else
console.log(stdout)
)
----> code ends here
Actually the problem is i'm not sure whether the syntax for child_process is correct. I am new to coffeescript and hubot. So i don't know how to resolve this
I have no familiarity with CoffeeScript or Node's child_process module, so I don't know how much help I'll be, but I'll try! Are you getting an error message or anything?
I think passing the shell commands within the child_process has some issues. If you come up with any solution or something related to that, please let me know. Thanks.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi. I am having doubts regarding using the ssh login to check the server status with child_process module. Is that something that you can help me with? Thanks.
I can try; I'm not sure which
child_process
module you're referring to, though. Do you have some code I could look at?yeah,
This is a coffescript for hubot.
code :
---> Code Starts here
child_process = require 'child_process'
module.exports = (robot) ->
robot.respond /check status/i, (res) ->
Actually the problem is i'm not sure whether the syntax for child_process is correct. I am new to coffeescript and hubot. So i don't know how to resolve this
I have no familiarity with CoffeeScript or Node's
child_process
module, so I don't know how much help I'll be, but I'll try! Are you getting an error message or anything?yeah. Error : Response not OK: no_text.
I think passing the shell commands within the child_process has some issues. If you come up with any solution or something related to that, please let me know. Thanks.