Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我尝试sshpass使用 node.js spawn() 运行命令来自动化 ssh。但它会自动从命令行退出而没有任何错误。这是我使用的代码。
sshpass
var tail = spawn("sshpass", ["-p", "test", "ssh", "-n", "test@xxx.x.xxx.xxx", "'cat testfile'"]); tail.stdout.on("data", function(data) { readData(data); });