Putty SSH Auto-Login, Run Command File


/ Published in: DOS Batch
Save to your folder(s)

Script I use to tail my server log files.


Copy this code and paste it in your HTML
  1. /*--------------------------------------------------------------------------------------------
  2. batch file
  3. -------------------------------------------------------------------------------------------- */
  4. start C:\path\to\putty.exe -ssh [user] -pw [password] -m C:\path\to\commands.txt
  5.  
  6. /*--------------------------------------------------------------------------------------------
  7. commands.txt
  8. -------------------------------------------------------------------------------------------- */
  9. tail -f /home/user/logs/yourdomain.com/http/access.log | grep -v "internal"

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.