First I have to say you that I'm a newbie, but I wanna learn!
I need a script which suppose to check the ftp and sftp communication. This is for 26 ftp and sftp. Script has to execute just 1 times and script suppose to login to ftp and sftp servers using username with password, easy from an extern list.
If ftp works also it has to send an mail and even if it is fail also it suppose to send the mail. Or just a print on screen with status : alive or not alive should be ok.
I am starting with the below script:
I found something like :
"You can use your script with a regular user, creating the file .netrc in the user's homedir (~/.netrc), with the following contents: Code: machine 192.1.1.1 login usename password user-passwd" ...
ftp -v -n <<EOF > ${LOG_FTP} 2>&1
open ${IP_ADDRESS_SERVER}
user ${FTPUSER} ${FTPPASS}
...
EOF
I need now to understand how I can send the email to my email adres or just print on screen the results.
Please can you suggest me the right way or help me write the script.
It would be great help for me.
Thanks in advance for all your help!
Nico