npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sftp-to-ftp

v1.1.3

Published

[![NPM Version](https://img.shields.io/npm/v/sftp-to-ftp.svg?branch=main)](https://www.npmjs.com/package/sftp-to-ftp) [![Publish Size](https://badgen.net/packagephobia/publish/sftp-to-ftp)](https://packagephobia.now.sh/result?p=sftp-to-ftp) [![Downloads](

Readme

SFTP-to-FTP Bridge

NPM Version Publish Size Downloads License: MIT

SSH/SFTP to FTP bridge for seamless file transfers

Create an FTP server that acts as a bridge to any SSH/SFTP server, allowing legacy FTP clients to interact with modern SSH servers. Instantly convert any SSH/SFTP server into an FTP-accessible resource. Perfect for:

  • Accessing SFTP directories directly in Windows File Explorer.
  • Using legacy FTP clients with modern SSH servers.
  • Exploring and managing remote files with any FTP-compatible tool.

Table of Contents

Installation

npm install sftp-to-ftp
# or globally
npm install -g sftp-to-ftp

Usage

Command Line Interface (3 Ways to Run)

  1. Interactive Mode (Prompt for details):
    npx sftp-to-ftp
    Example output:
    Enter SSH host/IP: 192.168.0.105
    Enter SSH port (Default: 22): 22
    Enter SSH username (Leave empty if not needed): root
    Enter SSH password (Leave empty if not needed): ********
    Enter FTP host/IP (Default: 127.0.0.1): 127.0.0.1
    Enter FTP port (Default: 21): 21
    🟢 FTP server listening! ftp://127.0.0.1:21

Windows File Explorer Tip: Simply enter ftp://127.0.0.1:21 (or your custom host/port) in the address bar to browse your SFTP server like a local folder!

  1. Direct Arguments (Fully automated):

    npx sftp-to-ftp --ssh-host 192.168.0.105 --ssh-port 22 --ssh-user root --ssh-pass PWD --ftp-host 127.0.0.1 --ftp-port 21
  2. Anonymous Mode (No SSH credentials required if pre-authenticated):

    npx sftp-to-ftp --ssh-host 192.168.0.105 --ssh-port 22 --ftp-host 127.0.0.1 --ftp-port 21

Programmatic Usage

import { SSHToFTPBridge } from 'sftp-to-ftp';

// Create bridge to SSH server
const bridge = new SSHToFTPBridge(
  {
    host: 'your-ssh-server',
    port: 22,
    username: 'your-user',
    password: 'your-pass'
  },
  {
    host: '127.0.0.1' // Optional FTP host
    port: 21 // Optional FTP port
  }
);

// The FTP server is now running on port 21
// Connect with any FTP client to ftp://127.0.0.1:21

// To shutdown:
// await bridge.terminate();

API Reference

Class: SSHToFTPBridge

Constructor

new SSHToFTPBridge(sshConfig: SSHConfiguration, options?: { port?: number })
  • sshConfig (Object):
    • host (string) - SSH server hostname/IP
    • port (number) - SSH port (default: 22)
    • username (string) - SSH username
    • password (string) - SSH password
  • options (Object, optional):
    • host (string) - FTP server hostname/IP (default: 127.0.0.1)
    • port (number) - FTP server port (default: 21)

Methods

  • terminate(): Promise<void> - Shuts down the FTP server and disconnects from SSH

Class: FTPSession

(Advanced usage - for custom FTP server implementations)

Properties

  • authenticated (boolean) - Session authentication status
  • cwd (string) - Current working directory
  • transferType (string) - Current transfer type (A/I)

Methods

  • send(code: number, message: string): void - Send FTP response
  • resolvePath(relativePath: string): string - Resolve relative paths

Supported Commands

| Command | Description | Status | |---------|----------------------------------|--------| | USER | Authentication username | ✅ | | PASS | Authentication password | ✅ | | LIST | Directory listing | ✅ | | RETR | Download file | ✅ | | STOR | Upload file | ✅ | | DELE | Delete file | ✅ | | MKD | Create directory | ✅ | | RMD | Remove directory | ✅ | | RNFR | Rename from | ✅ | | RNTO | Rename to | ✅ | | CWD | Change working directory | ✅ | | PWD | Print working directory | ✅ | | PASV | Passive mode transfer | ✅ | | PORT | Active mode transfer | ✅ | | TYPE | Transfer type (A/I) | ✅ | | SIZE | Get file size | ✅ | | MDTM | Get file modification time | ✅ | | QUIT | Disconnect | ✅ |

Contributing

Contributions are welcome! Please open an issue or submit a pull request on the GitHub repository.

License

sftp-to-ftp is licensed under the MIT license.

Author

|@SheikhAminul| |:---:| |@SheikhAminul|