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'
-
The problem statement, all variables and given/known data:
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. -
Relevant commands, code, scripts, algorithms:
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 -
The attempts at a solution (include all code and scripts):
telnet ServerB
echo user
sleep 1
echo password
sleep 1
cd landing_zone
ls -l > output.txt
mail -s "status" user@gmail.com < outout.txt
echo exit -
Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
Gautam Budh technical university
Uttar Pradesh
India
Mr. Nanhey Singh
Inderprastha Engg Collegesyllabus/CS_IT_b_tech_3_4_year.pdf
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).