mafintosh / mafintosh/ssh-exec
How to perform a series of commands?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 124
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
I'm wondering how I could use this module for running a series of conditional ssh commands. For example:
var folder = "example";
exec('cd ' + folder, 'ubuntu@my-remote.com', function (err, stdout, stderr) {
if(stdout.indexOf("No such file or directory") {
exec("mkdir " + folder, 'ubuntu@my-remote.com', function (err, stdout, stderr) {
});
}
exec("do something", "ubuntu@my-remote.com", function (err,stdout,stderr) {
});
})
Is this a valid approach? Is it necessary to provide the credentials for every command? Any suggestions?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the module's exec API and the command sequence shown in the issue. Determine how conditional commands and SSH credentials are intended to work, then document the supported usage and limitations. Done means the guidance answers whether this approach is valid and whether credentials are needed for each command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100