Security News
UK Officials Consider Banning Ransomware Payments from Public Entities
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Neo SCP is a lightweight real SCP module based on ssh2 module.
This module is inspired by scp1.
This module is still in beta, optimizations and new features will coming in future releases.
npm install neo-scp
In order to use Neo SCP you must pass to NeoScp
instance an ssh2 connection as follow.
const Client = require('ssh2').Client;
const NeoScp = require('neo-scp');
const conn = new Client();
conn.connect({
host: '192.168.0.2',
port: 22,
username: 'root',
password: 'password'
});
const localFile = 'local/file.txt';
const remoteFile = 'remote/file.txt';
conn.on('ready', () => {
const Scp = new NeoScp(conn);
Scp.putFile(localFile, remoteFile, (err, res) => {
if (err) throw err;
if (res.localSize === res.remoteSize)
console.log(`Upload successfully (${res.duration}ms)`);
else
console.log('Damaged remote file');
conn.end();
});
});
Sends a file to remote host.
You must pass the localFile
path, the remoteFile
destination path and a callback function.
The callback returns as result an object with following data:
{
duration: Number, // transfer duration in ms
localSize: Number, // size of local file in bytes
remoteSize: Number // size of remote file in bytes
}
Gets the remote file size.
You must pass the remoteFile
destination path and a callback function.
The callback returns as result the size in bytes.
Gets a file from remote host.
You must pass the remoteFile
path, the localFile
destination path and a callback function.
NeoScp class emits the debug
event with some debug informatione. The following code shows how to use it.
Scp.on('debug', data => {
console.log(data);
});
FAQs
A pure JS real scp module based on ssh2 module
The npm package neo-scp receives a total of 1 weekly downloads. As such, neo-scp popularity was classified as not popular.
We found that neo-scp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.