How to search some text in a file via SSH December 11, 2013 SSH Tutorials Let’s say we want to search for text lophost in file /var/log/messages We can do this using command grep. Login to your server via SSH and run following command grep lophost /var/log/messages [vps_hosting]