Connecting To Different Unix Box

Hi gurus

I want to to connect to a different unix box from current unix box and navigate to a folder and check if the log files are generated for every 10 minutes in the another unix box. how do i go about this requirement. is there a way to connect to different unix boxes.

thanks
raghavendra

to connect to a different unix box, you may use SSH ot telnet, provided that SSH or telnet (whatever you select) is working at that unix box. you may even use ftp or sftp.

i use putty and it resides in a different box. actually a windows workstation! i need to write a shell script and put it in a particular box and i should be able to navigate to other boxes from the box in which my shell script resides and i should be able to execute the script from my windows workstation. is it possible??

thanks
ragha

PUTTY is ssh.

ssh, by it's very nature, is quite a bear to automate.

Running the script automatically, that isn't a problem, create a new account with the correct permissions and have .bashrc or whatever run the script. Letting it login to other machines automatically is harder. Look for "shared keys" and ssh.

with ssh you may execute a command on a remote unix box and get its output without opening a session there, for example

ssh target_account@remote_host /usr/bin/ls some_dir/logfile

To automate the process you can use the crontab command but you will need some more steps to get ssh work in unattended mode, that is, without asking for password when the ssh command is invoked. The steps are:
1) the caller account must generate a pair of keys with ssh_keygen. Output files id_rsa and id_rsa.pub will be generated in the ${HOME}/.ssh directory. The first is your private key and the other one is your public key.
2) transfer your public key (id_rsa.pub) to the target account on the remote machine by scp or ftp or any other available method.
3) on the target account append your transferred public key (id_rsa.pub) to the file authorized_keys:
cat id_rsa.pub >> ${HOME}/.ssh/authorized_keys

Repeat steps 2 and 3 for any host you need to monitor.

Create a shell script, say ${HOME}/check.sh, with a line like below for any host you need to monitor:
/usr/bin/ssh target_account@remote_host /usr/bin/ls some_dir/logfile

Use the "crontab -e" command in the caller account to insert a line that will be executed every 10 minute:
00,10,20,30,40,50 * * * * ksh ${HOME}/check.sh >>${HOME}/check.log 2>&1

You may improve this idea to serve better your goals.

Hope this helps.

thanks a lot for your reply. i will try this out and let you know. thanks again