Find the answer to your Linux question:
Results 1 to 2 of 2
I am running two separate servers that have instances of VSFTPD running on them thats supplying config files to devices via FTP. For troubleshooting purposes we often look at these ...
  1. #1
    Just Joined!
    Join Date
    Jun 2007
    Posts
    7

    grep'ing/tail'ing vsftpd log files on two different servers

    I am running two separate servers that have instances of VSFTPD running on them thats supplying config files to devices via FTP. For troubleshooting purposes we often look at these log files to check for attempts to pull the files.

    The problem that I am running into is we have just installed two of these servers using a load balancer for incoming connections. This creates two seperate log files, one on each server. I am wanting to use a service or script that would allow me to connect to both servers simultaneously and grep or tail for log files on both servers.

    I use the following two commands depending on if its a live capture or not.

    grep -i mac_address /var/log/vsftpd/vstftpd.log

    or

    tail -f /var/log/vsftpd/vsftpd.log | grep -i mac_address

    any and all help is greatly appreciated.

    *will also be doing the same for HTTPD log files as well.

    thanks
    josh

  2. #2
    Linux User
    Join Date
    Jun 2007
    Posts
    318
    Probably the thing to do is execute the commands remotely on those servers by using ssh and public/private keys so passwords don't have to be entered.
    Your 1st command would look something like:

    Code:
    ssh -i identity_file server1 "grep -i mac_address /var/log/vsftpd/vstftpd.log"
    Look at the manpage for ssh-keygen on generating public/private keys.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...