
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
sftp-to-ftp
Advanced tools
[](https://www.npmjs.com/package/sftp-to-ftp) [](https://packagephobia.now.sh/result?p=sftp-to-ftp) [: 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!
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
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
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();
new SSHToFTPBridge(sshConfig: SSHConfiguration, options?: { port?: number })
sshConfig
(Object):
host
(string) - SSH server hostname/IPport
(number) - SSH port (default: 22)username
(string) - SSH usernamepassword
(string) - SSH passwordoptions
(Object, optional):
host
(string) - FTP server hostname/IP (default: 127.0.0.1)port
(number) - FTP server port (default: 21)terminate(): Promise<void>
- Shuts down the FTP server and disconnects from SSH(Advanced usage - for custom FTP server implementations)
authenticated
(boolean) - Session authentication statuscwd
(string) - Current working directorytransferType
(string) - Current transfer type (A/I)send(code: number, message: string): void
- Send FTP responseresolvePath(relativePath: string): string
- Resolve relative pathsCommand | 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 | ✅ |
Contributions are welcome! Please open an issue or submit a pull request on the GitHub repository.
sftp-to-ftp is licensed under the MIT license.
@SheikhAminul |
FAQs
[](https://www.npmjs.com/package/sftp-to-ftp) [](https://packagephobia.now.sh/result?p=sftp-to-ftp) [![Downloads](
We found that sftp-to-ftp 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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.