Remote login through ssh

Hi ,

I need to login to remotemachines through ssh and move some logfiles to my localmachine. My servername,username and password will be store in the .profile file. can any one please help me in this?
This will be a cronjob so Password can't be enter at run time.

Thanks in advance
Subin

Try searching the forum for the terms SSH and automation. Youll want an empty passphrase in your key file(s) to get true automation.

Hi subin_bala.
If your local machine is Linux/UNIX, and you are talking about syslog, you might want to configure a "loghost" on those servers so that they send their logs to your local machine.
Have a look at your syslogd man pages, there are usually examples on how to do this.
Regards.

Hi

Thanks for he reply
i am not talking about the system log.
i need to copy the application log from remoteserver

Thanks

Simple way will be to use expect script,it can be run from cron and it can simply scp logs to your machine

If you are using ssh key authentication, it should be be as simple as:
scp user@remotehost:/remote/dir/file /local/dir
if necessary to remove remote files use:
ssh user@remotehost "rm /remote/dir/file"