Xshell Highlight Sets File

Build different highlight profiles for different tasks—one for web server logs, one for database management, and another for network routing. How to Create and Configure Highlight Sets

One size rarely fits all. Create multiple highlight sets and toggle them based on your task.

: This feature is a staple in professional versions like Xshell 6, 7, and 8. 💡 Tips for Best Results XSHELL – NetSarang Website xshell highlight sets

When creating complex Highlight Sets, document what each pattern is intended to match. This pays dividends when returning to the configuration months later or when sharing with team members. Consider adding comments directly in .hls files using the Description field.

| Pattern | Highlight Color | Purpose | |---------|----------------|---------| | \b(curl|wget|nc|ncat|bash -i|sh -i)\b | 🔴 Red + Bold | Reverse shell / downloader | | (failed|denied|invalid|unauthorized) | 🟡 Yellow | Auth failures | | (root|admin|sudo|su) followed by (accepted|logged) | 🟢 Green + Bold | Privileged access success | | (SELECT.*FROM|DROP TABLE|INSERT INTO) | 🟣 Magenta | SQL injection in logs | | (\.\./|\%2e\%2e/) | 🔵 Cyan | Path traversal attempt | | (passwd|shadow|\.ssh|\.bashrc) | 🟠 Orange | Sensitive file access | | (\d1,3\.)3\d1,3 | 🟡 Dim yellow | IP addresses (less intrusive) | | (chmod 777|chmod 666) | 🔴 Red + Underline | Dangerous permissions | : This feature is a staple in professional

Click the button. Give your set a descriptive name, such as "Web Server Logs" or "System Debugging." Step 3: Add Keywords or Regex Click Add within your new set. Here, you define the "Rule": Keyword: Type a simple word like SUCCESS .

Start simple. Create three rules today: one for errors, one for warnings, and one for transaction IDs. Once you experience the joy of having critical information instantly pop out of the scrollback buffer, you will find yourself constantly adding new rules. Export your masterpiece, share it with your team, and never miss a critical log line again. Consider adding comments directly in

Click to save the rule. Repeat this process for other common keywords like WARN (yellow) or SUCCESS (green). Step 4: Activate the Highlight Set Open an active terminal session.

Click OK to save. To apply it to your current session, go to View > Highlight Set and select your newly created set. Harnessing Regular Expressions (Regex) for Dynamic Matches