Originally posted by: Atul.Singh
Hi All,
I have a problem with auto telnet script, but I want to tell u something
a) I am only a member access on the server, so not able to access 'root' account
b) not able to install any software on server
3) On server, there is not install 'except'
I have to write a script, which is ran from A server, login/telnet to B server, do 'ls -lrt' and send to me the output via mail.
I have only basic stucture....
run from Server A
1) login to B
2) cd landing path
3) ls -l > a.txt
4) mail -s "Status"
user@domain.com < a.txt
5) connection closed
I tried this code.....
run from Server A
( echo user sleep 1 echo password sleep 1 cd landing_zone ls -l > a.txt mail -s "Status" user@domail.com < a.txt ) | telnet B But this script return the
ls of
Server A but I want the
Server B guys please help me...
#AIX-Forum