python + auto ssh proccess to get date info
<p>I need to perform on my linux 5.3</p>

<pre><code>   ssh [Linux machine red hat 5.3] date
</code></pre>

<p>in order to get the date results , during ssh need to answer on the following question</p>

<ol>
<li>(yes/no)? -->    yes</li>
<li>password: -->    diana_123</li>
</ol>

<p>and then I will get the date results</p>

<p>please advice how to do this automated process with python? ( on my Linux I have 
Python 2.2.3 )</p>

<p>python script should get the IP address number , and perform automatically ssh to 103.116.140.151 and return the date results</p>

<pre><code>     as --&gt;  Fri Nov 18 11:25:18 IST 2011
</code></pre>

<p>example of manual proccess:</p>

<pre><code>  # 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.
    root@10.116.10.151's password: 

    Fri Nov 18 11:25:18 IST 2011
</code></pre>
