I need to perform on my linux 5.3
ssh [Linux machine
red hat 5.3] date
in order to get the date results , during ssh need to answer on the following question
(yes/no)? -- yes
password: -- diana_123
and then I will get the date results
please advice how to do this automated process with python? ( on my Linux I have
Python 2.2.3 )
python script should get the IP address number , and perform automatically ssh to 103.116.140.151 and return the date results
as --> Fri Nov 18 11:25:18 IST 2011
example of manual proccess:
# ssh 103.116.140.151 date
The authenticity of host '103.116.140.151 (103.116.140.151)' can't be established.
RSA key fingerprint is ad:7e:df:9b:53:86:9f:98:17:70:2f:58:c2:5b:e2:e7.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '103.116.140.151' (RSA) to the list of known hosts.
[email protected]'s password:
Fri Nov 18 11:25:18 IST 2011