-
Notifications
You must be signed in to change notification settings - Fork 0
SSH Configuration
Laravel Log Parser integrates with your existing SSH configuration to access remote servers seamlessly.
The tool reads your SSH configuration from ~/.ssh/config. Here's how to set it up:
Host production HostName 10.1.2.3 User ubuntu Port 22 IdentityFile ~/.ssh/production-key.pem
Host staging HostName staging.company.com User deploy Port 2222 IdentityFile ~/.ssh/staging-key.pem
Host web-* User ubuntu Port 22 IdentityFile ~/.ssh/web-servers.pem
Host web-prod HostName 10.1.2.3
Host web-staging HostName 10.1.2.4
Once configured, reference hosts by their alias:
logparse production
logparse staging
logparse production --errors-only --since=today
If your Laravel logs are not in the default location:
logparse --remote-path="app/storage/logs/laravel.log" production
logparse --remote-path="logs/application.log" staging
The tool supports all SSH authentication methods:
- SSH keys (recommended)
- SSH agent
- Password authentication (interactive)
- SSH certificates
Test SSH connectivity:
ssh production "echo 'Connection successful'"
logparse production --last=1
- Verify SSH key permissions: chmod 600 ~/.ssh/your-key.pem
- Check SSH config syntax: ssh -F ~/.ssh/config production
- Verify SSH config file exists and is readable
- Check host alias spelling
- Test direct SSH connection first
- Verify network connectivity
- Check firewall rules
- Confirm SSH daemon is running on target server
logparse --ssh-config="/path/to/custom/config" hostname