The SSH connector
The SSH connector lets Log Lens index log files that live on a remote host - a production box, a staging server, a container - without copying whole files to your machine. It connects over standard ssh, discovers the files you point it at, and streams only the byte ranges it needs. If you already use the local-directory connector, this is its remote counterpart.
Connection settings
Set the connector type to ssh and supply a config object:
| Key | Required | Notes |
|---|---|---|
host | yes | Only a-z A-Z 0-9 . _ : - allowed |
user | yes | Only a-z A-Z 0-9 . _ - allowed |
port | no | Defaults to 22; must be 1-65535 |
key_path | no | Private key file; must exist on disk |
known_hosts_file | no | Custom known-hosts file; must exist |
paths | yes | 1-100 absolute paths or glob patterns |
Log Lens always connects with BatchMode=yes (no password prompts - use key-based auth) and a connect timeout. When key_path is set it adds IdentitiesOnly=yes so only that key is offered.
Host-key verification
Connections always run with StrictHostKeyChecking=yes. The remote host must already be a trusted, known host - an unknown or changed host key causes the connection to fail rather than prompt. Point known_hosts_file at a dedicated file if you don't want to rely on the default one.
Path patterns
Each entry in paths is either an exact file or a single-level glob using *, ?, or [...]:
/var/log/nginx/access.log
/var/www/*/storage/logs/laravel.log
/var/log/app-[0-9].log
Every path must be absolute. These are rejected: recursive ** globs, .. traversal segments, and control characters. Configure between 1 and 100 patterns.
Safety limits and testing
- Discovery aborts if patterns expand to more than 10,000 files - narrow your patterns.
- Reads and prefix hashes run in bounded chunks with timeouts that scale to the byte count, so a huge file can't hang a sync.
- Test runs a lightweight handshake, then reports how many configured files were discovered - use it before saving.