hi sampath,
use the following command to extract ip address from eth0:
$ ifconfig eth0|grep 'inet addr'|tr -s ' '|cut -d' ' -f3|cut
-d':' -f2
write a script which will run along with the startup scripts, and will
determine whether ip address changes. Additionally u need to save the
previous ip address in some temp file and compare the previous ip
address, which is in temp file, with current ip address. If not equal,
invoke mail service(ex, evolution) to send the mail with current ip and
overwrite the previous ip with current ip in temp file. If ip addresses
are equal, then do nothing.
This script should run on every boot-up and shd not be a daemon.
which command do u use to send mail from command prompt??
thanks,
uma..
sampath wrote:
> Hi to all
>
> I have reliance broadband connection, which will gives dynamic IP. Actually I
> want to access my machine from my office using ssh. But my IP changes when
> ever my session logs out or when ever my machine reboots. So the script
> should detect this and mail to my mail account in a secure way. Please try to
> help me.
>
>
> Thanks&Regards
>
>
> Sampath Inturi
>