Improve regex for segmentation

Improve regex for better matching with different SSH config formats. Sometimes with many returns, mixed tabs/spaces etc, it breaks the segmentation.