0.0.2 • Published 10 years ago

secureftp v0.0.2

Weekly downloads
1
License
-
Repository
-
Last release
10 years ago

secureftp

Create SFTP connections in node.js to remote servers

Features:

  • Supports infinite commands with arguments
  • Fully supported SFTP methods
  • Handles all the dirty stuff under the hood

Usage:

	var SFTP = require('secureftp');
	
	// CONNECT to '127.0.0.0' as 'root' 
	var sftp = new SFTP('root', '127.0.0.0');
	
	// RUN Commands
	// 1. Argument: cd /root/project/public
	// 2. Argument: ls -1
	sftp('cd /root/project/public', 'ls -1', function(data){
		console.log(data);
	});
	
	// GET HELP with:
	sftp('help', function(data){ console.log(data); });

Setup SFTP Instance Arguments

{
	"user: "root" 			// the username to connect with
	"host": "127.0.0.0"		// the host to reach usually an IP
}

SFTP function Arguments

You can have inifinite command arguments, the last one is the callback function

	sftp(command, command2 ... , callback)

Warning

  • The module only works if rsa key is configured with the server you want to reach

Todo

  • Single time login with a password.