Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
ts-sftp-server
Advanced tools
Readme
Implement a simple SFTP Server using TypeScript and Node.js.
NOTE: This work is part of MACbioIDi2: Promoting the cohesion of Macaronesian regions through a common ICT platform for biomedical R & D & i (INTERREG program MAC2/1.1b/352).
Warning Not all FTP methods are implemented.
Based on work by @mscdex - ssh2, ssh2-streams. Inspired by the work of @validityhq - node-sftp-server and @expressjs - express.
import SFTPServer from "ts-sftp-server";
let sftpServer = new SFTPServer({
port: 3000,
privateKeyFilePath: PRIVATE_KEY_FILE_PATH,
authMethods: ['password'],
printMethods: {
// Print to console on error (not mandatory to implement)
onError: (msg: string) => {
// console.log(msg);
},
// Print to console on operation success (not mandatory to implement)
onSuccess: (msg: string) => {
// console.log(msg);
},
// Print to console warnings (not mandatory to implement)
onWarning: (msg: string) => {
// console.log(msg);
},
},
});
Event | Description |
---|---|
Connection | Allow/Refuse connection |
Auth | User authentication |
RENAME | Rename a file/folder inside the server |
REMOVE | Remove file from the server |
SETSTAT | Change file properties |
WRITE | Write changes to a file |
READ | Read file content |
OPENDIR | Client request to open a certain directory |
RMDIR | Client request to remove a certain directory |
MKDIR | Client request to create a certain directory |
READDIR | Client request to read list of a directory's contents alongside that content's permissions |
CLOSE | Client closing pointer to a certain file/directory |
REALPATH | Tell client information related to a path |
LSTAT,STAT,FSTAT | Tell client information related to a file/directory |
The example inside the folder "test" demos the implementation of an SFTP Server using TypeScript
Funding | Description |
---|---|
MACbioIDi2 | Promoting the cohesion of Macaronesian regions through a common ICT platform for biomedical R & D & i (INTERREG program MAC2/1.1b/352) |
NeuroRehabLab | The NeuroRehabLab is an interdisciplinary research group of the University of Madeira that investigates the intersection of technology, neuroscience, and clinical practice to find novel solutions to increase the quality of life of those with special needs. We capitalize on Virtual Reality, Serious Games, and Brain-Computer Interfaces to exploit specific brain mechanisms that relate to functional recovery to approach motor and cognitive rehabilitation by means of non-invasive and low-cost technologies. |
ARDITI | The Regional Agency for the Development of Research, Technology and Innovation - ARDITI, aims to support research and experimental development activities, the promotion of technological diffusion, training and scientific and technical information, as well as actions that contribute to the modernization and development of the Autonomous Region of Madeira (RAM). This support will be in line with the Region’s economic and social development plan, in particular with a view to ensuring the sustainability of economic growth and employment in the Region. This plan promotes a new paradigm of development policies based on innovation, entrepreneurship and the knowledge society, thus guaranteeing a significant increase in the population's educational and training levels and, simultaneously, an increase in social cohesion. |
FAQs
NodeJS SFTP Server using TypeScript
The npm package ts-sftp-server receives a total of 1 weekly downloads. As such, ts-sftp-server popularity was classified as not popular.
We found that ts-sftp-server demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.