Shell Fallback (cat/dd/base64)
This plugin includes shell-based transfer strategies for servers where SFTP/SCP are restricted or unreliable.
Why this matters
- Some hosts allow shell commands but block normal SFTP/SCP channels
- Some tools (including standard clients) fail there; plugin can continue using shell pipelines
- Shell fallback can succeed where typical tools often fail
Implemented paths
- Raw shell transfer:
cat stream paths for direct data movement
- dd block transfer: Controlled block-size transfers with offset support
- Base64 chunk transfer: Robust fallback for restrictive environments
- Resume alignment: Base64 resume aligns to 3-byte boundaries to keep integrity
- SCP shell mode: SCP protocol over shell channel
Commands used
The plugin uses standard Unix commands:
cat - Raw file streaming
dd - Block-level copy with offset
base64 - Encoding for text-only channels
ls, mkdir, rm, mv - File operations
stat - File metadata
When to enable
- Enable
Use shell transfer (for blocked hosts) when SCP/SFTP fail due to host policy
- Use together with SCP settings depending on host behavior
- For maximum force behavior, use shell transfer force workflow
- SFTP subsystem unavailable errors
- SCP permission or protocol errors
Transfer methods
Method 1: Raw cat
Download: cat /remote/file.txt
Upload: cat > /remote/file.txt
Fast, no encoding overhead. Best for simple cases.
Method 2: dd with blocks
Download: dd if=/remote/file.txt bs=16384 skip=N
Upload: dd of=/remote/file.txt bs=16384 seek=N conv=notrunc
Precise offset control for resume operations.
Method 3: Base64 encoding
Download: base64 -w 0 /remote/file.txt
Upload: base64 -d > /remote/file.txt
Most robust - works through any text-only channel. 33% size overhead.
Performance considerations
- Raw cat: Fastest, no overhead
- dd: Moderate overhead, good for resume
- Base64: 33% size increase, encoding/decoding CPU cost
- Plugin auto-selects best method based on server capabilities
Security notes
- Filenames properly shell-escaped
- Path traversal prevented
- Commands executed within user's permission scope
Note: Shell fallback prioritizes compatibility over terminal semantics. Some interactive features may not work.
See also
Back to index