SFTP (File Transfer)

Secure, visual file management operations

The Secure File Transfer Protocol (SFTP) is a subsystem of SSH. Unlike FTP (which is insecure) or FTPS (which requires complex certificate handling), SFTP runs over your existing SSH tunnel. Netcatty integrates a robust, dual-pane SFTP client directly into the interface.

The Dual-Pane Interface

Inspired by classic tools like Norton Commander and Total Commander, Netcatty uses a Source / Destination model.

  • Left Pane: Typically your Local File System.
  • Right Pane: The Remote Server.

However, these are flexible. You can navigate; the context is indicated by the path bar at the top of each pane.

Dual-pane SFTP interface

File Operations

Basic Transfer

Drag and Drop is the primary mechanic.

  • Upload: Drag from Left (Local) to Right (Remote).
  • Download: Drag from Right (Remote) to Left (Local).
  • External Drop: You can also drag files from your OS desktop directly onto the Remote pane to upload, or drag from Remote to your desktop to download.

Advanced: Remote-to-Remote Transfer

Netcatty supports transferring files between two different remote servers without downloading them to your disk first.

The Workflow:

  1. Connect to Server A. Open SFTP.
  2. In the Left pane, instead of Local, use the "Connect" dropdown to select Server B.
  3. You now see Server B (Left) and Server A (Right).
  4. Drag a file across.
  5. Technical Note: Netcatty "pipes" the data securely through your local memory (Stream A -> Local Memory -> Stream B). The data is not written to your local hard drive, ensuring speed and security.

Conflict Resolution

When a file already exists, Netcatty prompts for a decision:

  • Replace: Overwrite the target file with the new one.
  • Keep Both: Auto-append a unique identifier to the new file name (e.g., file (1).txt).
  • Skip: Do nothing and cancel the specific file transfer.

Bulk Actions

If you are transferring a folder with multiple conflicts, you can check Apply to all to resolve all remaining conflicts with the same decision.

Editing Files (The Built-in Editor)

You don't need to leave Netcatty to modify configuration files or scripts.

  1. Right-click a remote file (e.g., nginx.conf).
  2. Select Edit.
  3. Netcatty opens the file in a built-in Monaco-based editor (the same engine powering VS Code).
  4. Syntax Highlighting: Supports over 40 languages including Javascript, Python, Shell, YAML, and Dockerfiles.
  5. Direct Save: Press Cmd+S (Mac) or Ctrl+S (Win) to securely upload changes directly back to the server.
  6. Search & Replace: Full search support within the editor modal.

Built-in Text Editor

Permission Management

SFTP allows you to modify UNIX file permissions.

  1. Right-click a file/folder.
  2. Select Properties.
  3. You will see a visual chmod grid (Read/Write/Execute for Owner/Group/World).
  4. You can also type the octal code (e.g., 755 or 600) directly.
  5. Recursive Apply: For folders, you can choose to apply these permissions to all children.

Hidden Files

By default, "dotfiles" (.bashrc, .env) are hidden to reduce clutter.

  • Toggle: Click the Eye Icon in the toolbar to show/hide hidden files.

Troubleshooting

"Permission Denied"

If upload fails:

  1. Check the "Owner" column in the file list. Does the connected user have write access to this directory?
  2. Try uploading to /tmp/ first to verify connectivity, then mv via terminal using sudo.

"Transfer Slow"

SFTP is encrypted, which adds CPU overhead.

  • Small files (thousands of 1KB files) are slow due to protocol handshake latency.
  • Recommendation: For massive directory transfers, it is infinitely faster to tar -czf the folder on the server via Terminal, download the single .tar.gz file via SFTP, and extract it locally.