Justin: <br><br>I should have added to the below: it's not urgent (since I can do everything I need with os.system('ssh -f ...') -- so don't worry if you don't have time.<br><br><br><div class="gmail_quote">
On Fri, Apr 16, 2010 at 8:04 AM, Dan Yamins <span dir="ltr"><<a href="mailto:dyamins@gmail.com">dyamins@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Here are two places where behavior of executing a command via connection.execute is different from executing it at the actual shell, causing trouble:<br><br><br>1) I can run this command fine at the actual shell of one of my node, when logged in as root:<br>
<br> su gotdata -c "ssh -f -N -L 27017:localhost:27017 <a href="mailto:gotdata@ec2-184-73-101-141.compute-1.amazonaws.com" target="_blank">gotdata@ec2-184-73-101-141.compute-1.amazonaws.com</a>"<br><br>It runs, returns without blocking, doing exactly what I want (establishing an ssh tunnel from one node to another on port 27017). <br>
<br>But when I try to execute this command over the execute method in the starcluster shell, it DOES block: <br><br> solr_conn.execute('su gotdata -c "ssh -f -N -L 27017:localhost:27017 <a href="mailto:gotdata@ec2-184-73-101-141.compute-1.amazonaws.com" target="_blank">gotdata@ec2-184-73-101-141.compute-1.amazonaws.com</a>"')<br>
<br>... and only returns when I manually kill the ssh tunnel that it starts. What should I do to get what I want?<br><br><br>2) The same command, minus the su part, runs fine at the actual shell:<br><br> ssh -f -N -L 27017:localhost:27017 <a href="mailto:gotdata@ec2-184-73-101-141.compute-1.amazonaws.com" target="_blank">gotdata@ec2-184-73-101-141.compute-1.amazonaws.com</a><br>
<br>but when I run this command via the execute method, it fails:<br><br> In [31]: solr_conn.execute('ssh -f -N -L 27017:localhost:27017 <a href="mailto:gotdata@ec2-184-73-101-141.compute-1.amazonaws.com" target="_blank">gotdata@ec2-184-73-101-141.compute-1.amazonaws.com</a>')<br>
Out[31]: ['Host key verification failed.']<br><br>Why is the behavior different? <br><br><br>Thanks,<br><font color="#888888">Dan<br><br>
</font></blockquote></div><br>