XeFM provides seamless SFTP (SSH File Transfer Protocol) support, allowing you to browse, search, and manage files on remote servers as if they were local directories. SFTP integration uses SSH multiplexing for optimal performance and supports all standard file operations.
~/.ssh/configNavigate to an SFTP location using the standard SSH URL format:
ssh://hostname/path/to/directory
ssh://user@hostname/path/to/directory
ssh://hostname:port/path/to/directory
Examples:
ssh://myserver/home/user/projects
ssh://admin@192.168.1.100/var/log
ssh://server.example.com:2222/opt/data
Method 1: Jump to Path Dialog
Shift-J (Jump to path)ssh://hostname/pathMethod 2: Favorite Directories
~/.xefm/config.pyJ to access favoritesMethod 3: Command Line
python3 -m xefm --left ssh://server/path --right ~/local/path
Create or edit ~/.ssh/config to simplify connections:
Host myserver
HostName server.example.com
User myusername
Port 22
IdentityFile ~/.ssh/id_rsa
Host devbox
HostName 192.168.1.100
User developer
Port 2222
Host prod-*
User admin
IdentityFile ~/.ssh/prod_key
StrictHostKeyChecking yes
Benefits:
ssh://myserver/path instead of full detailsGenerate SSH key (if you don’t have one):
ssh-gen -t rsa -b 4096 -C "your_email@example.com"
Copy key to server:
ssh-copy-id user@hostname
Test connection:
ssh user@hostname
Once SSH key authentication works, XeFM will use it automatically.
All standard file operations work on SFTP paths:
C): Copy files/directories between local and remoteM): Move files/directories on remote serverK): Delete remote files/directoriesR): Rename remote files/directoriesM when nothing is selected): Create directories on remote serverV): View remote text files with syntax highlightingXeFM seamlessly handles operations between different storage types:
Local ↔ SFTP:
Copy: ~/local/file → ssh://server/remote/path
Move: ssh://server/data → ~/backup/
SFTP ↔ S3:
Copy: ssh://server/logs → s3://bucket/archive/
Move: s3://bucket/data → ssh://server/processing/
SFTP ↔ Archive:
Copy: ssh://server/file.txt → local-archive.zip
Extract: ssh://server/archive.tar.gz → ~/extracted/
Filename Search (Alt+F7 or F):
*.py, test_*.txtContent Search (G):
Example searches:
*.log # Find all log files
config.* # Find config files with any extension
test_.*\.py # Find Python test files
XeFM includes several optimizations for SFTP operations:
View remote text files with full syntax highlighting:
Enter or V to open viewer/ to search within fileq to close viewerSupported formats: Python, JavaScript, JSON, YAML, Markdown, Shell scripts, and 20+ more with pygments installed.
Add to ~/.xefm/config.py:
# SFTP cache TTL for successful results (seconds)
SSH_CACHE_TTL = 30
# SFTP cache TTL for cached errors (seconds)
SSH_CACHE_ERROR_TTL = 300
Add frequently-used SFTP paths to favorites:
FAVORITE_DIRECTORIES = [
('Local Projects', '~/projects'),
('Dev Server', 'ssh://devbox/var/www'),
('Production Logs', 'ssh://prod-web1/var/log/nginx'),
('Backup Server', 'ssh://backup/mnt/backups'),
('S3 Bucket', 's3://my-bucket/data'),
]
Access with j key.
XeFM automatically uses SSH Control Master for connection multiplexing. To verify it’s working:
# Check for control socket
ls -la ~/.ssh/
# Look for: controlmaster-*
# Monitor SSH connections
ssh -O check user@hostname
Benefits:
Select multiple files and perform batch operations:
Space to select filesA to select all files in directoryC for copy, K for delete, etc.)The progress bar fills as the bytes actually move, in both directions, so a slow transfer over a high-latency link no longer looks stalled at 0%. Press ESC to cancel: the transfer stops within about half a second rather than running to completion in the background, and the partly-transferred file is removed.
Example: Backup multiple directories
1. Navigate to ssh://server/data
2. Select directories with Space
3. Press C (Copy)
4. Navigate to ~/backup
5. Press Enter to confirm
Press Shift-X to enter sub-shell mode with SFTP environment variables:
# Environment variables available:
echo $XEFM_LEFT_DIR # May be ssh://server/path
echo $XEFM_RIGHT_DIR # May be local path
echo $XEFM_THIS_DIR # Current pane (SFTP or local)
# Use with standard tools:
scp $XEFM_THIS_DIR/file.txt user@other:/path/
rsync -av $XEFM_THIS_DIR/ backup/
Type exit to return to XeFM.
Problem: “Connection refused” or “Connection timeout”
Solutions:
ssh user@hostnameProblem: “Permission denied (publickey)”
Solutions:
ssh-add -lssh-copy-id user@hostnameProblem: “Host key verification failed”
Solutions:
ssh user@hostnamessh-keygen -R hostname~/.ssh/known_hostsProblem: Slow directory listings
Solutions:
ping hostname~/.ssh/config:
Compression yes
CompressionLevel 6
Problem: Search is slow
Solutions:
Problem: Directory listing not updating
Solutions:
Problem: Deleted files still showing
Solution:
chmod 600 ~/.ssh/id_rsaFor permission changes:
# Press X to enter sub-shell
chmod 755 $XEFM_THIS_DIR/script.sh
exit
For advanced operations:
# Use sub-shell with standard tools
rsync -av --progress $XEFM_THIS_DIR/ backup/
tar czf archive.tar.gz $XEFM_THIS_DIR/*
1. Left pane: ~/projects/website (local)
2. Right pane: ssh://webserver/var/www/html
3. Select updated files in left pane (Space)
4. Press F5 (Copy)
5. Confirm overwrite
6. Watch progress bar
1. Left pane: ssh://server/var/log
2. Right pane: ~/logs/backup
3. Search for logs: Alt+F7, pattern: *.log
4. Select all results: a
5. Press F5 (Copy)
6. Files copied to local backup
1. Navigate to: ssh://server/tmp
2. Search for old files: Alt+F7, pattern: *.tmp
3. Review results
4. Select files to delete: Space
5. Press F8 (Delete)
6. Confirm deletion
1. Left pane: ~/local/config
2. Right pane: ssh://server/etc/app
3. Use external diff tool: x
4. Select "Beyond Compare" or "diff"
5. Review differences
For implementation details and architecture, see: