SSH tasks for Grunt.
This library provides two Grunt tasks for ssh:
- sftp
- sshexec
// don't keep passwords in source control
secret: '<json:secret.json>',
sftp: {
test: {
files: {
"./": "*json"
},
options: {
path: '/tmp/',
host: '<%= secret.host %>',
username: '<%= secret.username %>',
password: '<%= secret.password %>'
}
}
},
sshexec: {
test: {
command: 'uptime',
options: {
host: '<%= secret.host %>',
username: '<%= secret.username %>',
password: '<%= secret.password %>'
}
}
}
Copies one or more files to a remote server over ssh.
Inside your grunt.js
file add a section named sftp
.
The files to copy. Should contain key:value pairs.
The path on the remote server. Defaults to home.
Options for minimatch.
The username to authenticate as on remote system.
The password to authenticate on remote system.
The remote host to copy to, set up in your ~/.ssh/config
.
The remote port, optional, defaults to 22
.
Runs a command over ssh.
Inside your grunt.js
file add a section named sshexec
.
The command to run.
The username to authenticate as on remote system.
The password to authenticate on remote system.
The remote host to copy to, set up in your ~/.ssh/config
.
The remote port, optional, defaults to 22
.
- 2013/02/13 - v0.1.0 - Initial release with sshexec and sftp tasks.
Copyright (c) 2013 Andrew Jones Licensed under the MIT license.