Net::SFTP is a pure-Ruby module for programmatically interacting with a remote host via the SFTP protocol (that's SFTP as in "Secure File Transfer Protocol" produced by the Secure Shell Working Group, not "Secure FTP" and certainly not "Simple FTP").
See Net::SFTP#start for an introduction to the library. Also, see Net::SFTP::Session for further documentation.
| Use Case | Command | Description |
|---|---|---|
| Start an SFTP session | Net::SFTP.start(host, user, options) |
Initiate a connection to a remote host via SFTP |
| Download a file | sftp.download!(remote_path, local_path) |
Download a file from the remote host to the local system |
| Upload a file | sftp.upload!(local_path, remote_path) |
Upload a file from the local system to the remote host |
| List directory contents | sftp.dir.entries(path) |
Retrieve the entries in a remote directory |
| Open a file handle | sftp.file.open(path, mode) |
Open a file on the remote server for reading or writing |
startdirdownloaddownload!fileupload!Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-30 14:03 @216.73.217.152
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format