How to telnet to other unix machines and grep log files etc?
Chris Stromberger
bit_bucket5 at hotmail.com
Wed Jul 25 19:36:34 EDT 2001
On 25 Jul 2001 17:22:12 GMT, quinn at regurgitate.ugcs.caltech.edu (Quinn
Dunkan) wrote:
>On 25 Jul 2001 08:42:44 -0700, Chris <bit_bucket5 at hotmail.com> wrote:
>>Relative unix newbie. Would like to write a python script to do what
>>I do manually--telnet to two different unix machines from a third unix
>>machine. Grep through some log files, gather the grep results from
>>the different machines and spit them out. I think I need to do
>>something with popen, or popen2, or ??? I don't know where to start.
>>Any pointers much appreciated.
>
>This is a shell task:
>
>(ssh machine1 'grep foo /sys/log/bar';
> ssh machine2 'grep baz /sys/log/faz') >results
>
>Create an RSA key with no passphrase if you don't want to have to type
>passwords all the time.
I went ahead and tried this, and it works a charm! Thanks for the
suggestion! I read the ssh man page and was able to create the rsa
key w/o passphrase. Thanks very much.
-Chris
More information about the Python-list
mailing list