<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Send Remote Commands Via SSH</title>
	<atom:link href="http://systemsboy.com/2006/07/send-remote-commands-via-ssh.html/feed" rel="self" type="application/rss+xml" />
	<link>http://systemsboy.com/2006/07/send-remote-commands-via-ssh.html</link>
	<description>Big, Honkin' Systems Stuff</description>
	<lastBuildDate>Sat, 06 Mar 2010 18:45:21 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Tim</title>
		<link>http://systemsboy.com/2006/07/send-remote-commands-via-ssh.html/comment-page-1#comment-436</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Wed, 30 Jul 2008 22:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://systemsboy.com/2006/07/send-remote-commands-via-ssh/#comment-436</guid>
		<description>With openssh you can set a ConnectTimeout... &lt;br/&gt;ssh -o ConnectTimeout=8 blah blah&lt;br/&gt;&lt;br/&gt;Timeout is in seconds.</description>
		<content:encoded><![CDATA[<p>With openssh you can set a ConnectTimeout&#8230; <br />ssh -o ConnectTimeout=8 blah blah</p>
<p>Timeout is in seconds.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: systemsboy</title>
		<link>http://systemsboy.com/2006/07/send-remote-commands-via-ssh.html/comment-page-1#comment-435</link>
		<dc:creator>systemsboy</dc:creator>
		<pubDate>Tue, 01 Jul 2008 23:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://systemsboy.com/2006/07/send-remote-commands-via-ssh/#comment-435</guid>
		<description>Razi,&lt;br/&gt;&lt;br/&gt;The end of the command should not log you out of the Terminal. It should only log you out of the machine you&#039;re SSHing to. If you don&#039;t want to log out of that machine, there&#039;s not really any reason to use this method. Just SSH into the machine and run your command(s). Then log out when you&#039;re good and ready.&lt;br/&gt;&lt;br/&gt;Or, to answer your question more directly, I don&#039;t know of a way to do this, but I don&#039;t really know why you&#039;d need to either.&lt;br/&gt;&lt;br/&gt;-systemsboy</description>
		<content:encoded><![CDATA[<p>Razi,</p>
<p>The end of the command should not log you out of the Terminal. It should only log you out of the machine you&#8217;re SSHing to. If you don&#8217;t want to log out of that machine, there&#8217;s not really any reason to use this method. Just SSH into the machine and run your command(s). Then log out when you&#8217;re good and ready.</p>
<p>Or, to answer your question more directly, I don&#8217;t know of a way to do this, but I don&#8217;t really know why you&#8217;d need to either.</p>
<p>-systemsboy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Razi</title>
		<link>http://systemsboy.com/2006/07/send-remote-commands-via-ssh.html/comment-page-1#comment-434</link>
		<dc:creator>Razi</dc:creator>
		<pubDate>Fri, 27 Jun 2008 05:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://systemsboy.com/2006/07/send-remote-commands-via-ssh/#comment-434</guid>
		<description>How do I accomplish the same task but after I terminate the command, I want to remain logged into the terminal?</description>
		<content:encoded><![CDATA[<p>How do I accomplish the same task but after I terminate the command, I want to remain logged into the terminal?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: systemsboy</title>
		<link>http://systemsboy.com/2006/07/send-remote-commands-via-ssh.html/comment-page-1#comment-433</link>
		<dc:creator>systemsboy</dc:creator>
		<pubDate>Wed, 23 Jan 2008 20:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://systemsboy.com/2006/07/send-remote-commands-via-ssh/#comment-433</guid>
		<description>Yup. Nothing like a good ol&#039; for loop. You could do similar with a simple list of computer names:&lt;br/&gt;for computer in `cat computers.txt`; do ssh -t user@$computer.domain &#039;ls /Applications&#039;; done&lt;br/&gt;&lt;br/&gt;Love it!&lt;br/&gt;&lt;br/&gt;-systemsboy</description>
		<content:encoded><![CDATA[<p>Yup. Nothing like a good ol&#8217; for loop. You could do similar with a simple list of computer names:<br />for computer in `cat computers.txt`; do ssh -t user@$computer.domain &#8216;ls /Applications&#8217;; done</p>
<p>Love it!</p>
<p>-systemsboy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kernalpanx</title>
		<link>http://systemsboy.com/2006/07/send-remote-commands-via-ssh.html/comment-page-1#comment-432</link>
		<dc:creator>kernalpanx</dc:creator>
		<pubDate>Wed, 23 Jan 2008 20:42:00 +0000</pubDate>
		<guid isPermaLink="false">http://systemsboy.com/2006/07/send-remote-commands-via-ssh/#comment-432</guid>
		<description>when u have more then one server to do that too...... with a good naming convention you can laways use the for command&lt;br/&gt;for i in 1 2 3 4 5 6 7 8 9 10 11 ; do ssh admin@fileserver$i.domain.com &#039;date&#039; &#039;cd / ; du -sh /* ; done&lt;br/&gt;&lt;br/&gt;etc etc</description>
		<content:encoded><![CDATA[<p>when u have more then one server to do that too&#8230;&#8230; with a good naming convention you can laways use the for command<br />for i in 1 2 3 4 5 6 7 8 9 10 11 ; do ssh admin@fileserver$i.domain.com &#8216;date&#8217; &#8216;cd / ; du -sh /* ; done</p>
<p>etc etc</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: linux_newbie8478</title>
		<link>http://systemsboy.com/2006/07/send-remote-commands-via-ssh.html/comment-page-1#comment-431</link>
		<dc:creator>linux_newbie8478</dc:creator>
		<pubDate>Thu, 06 Dec 2007 01:29:00 +0000</pubDate>
		<guid isPermaLink="false">http://systemsboy.com/2006/07/send-remote-commands-via-ssh/#comment-431</guid>
		<description>Hi,&lt;br/&gt;&lt;br/&gt;I&#039;m writing a small python script, which should ssh to 5 diff boxes and get the result for uptime from each box. I want to run this as a daemon process so that I know the least loaded box at any time.&lt;br/&gt;&lt;br/&gt;This can be easily done using a simple for loop around -&lt;br/&gt;load = str(commands.getoutput(&quot;ssh &quot; + machine[0]+ &quot; uptime&quot;))&lt;br/&gt;&lt;br/&gt;But the problem arises when 1 of the 5 remote machines is down. The script just waits for a response from that machine and does not move on to the next box&lt;br/&gt;&lt;br/&gt;How do I instruct the ssh cmd to timeout after say 1 min?&lt;br/&gt;&lt;br/&gt;This can be achieved using a Timer thread in the python script, but it would be much easier if ssh had a switch for the same.&lt;br/&gt;&lt;br/&gt;Unfortunately I can&#039;t locate anything in the man pages for ssh&lt;br/&gt;&lt;br/&gt;BTW I&#039;m using -&lt;br/&gt;$ ssh -V&lt;br/&gt;OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0x0090701f&lt;br/&gt;$ &lt;br/&gt;&lt;br/&gt;Thanks for your help</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;m writing a small python script, which should ssh to 5 diff boxes and get the result for uptime from each box. I want to run this as a daemon process so that I know the least loaded box at any time.</p>
<p>This can be easily done using a simple for loop around -<br />load = str(commands.getoutput(&#8220;ssh &#8221; + machine[0]+ &#8221; uptime&#8221;))</p>
<p>But the problem arises when 1 of the 5 remote machines is down. The script just waits for a response from that machine and does not move on to the next box</p>
<p>How do I instruct the ssh cmd to timeout after say 1 min?</p>
<p>This can be achieved using a Timer thread in the python script, but it would be much easier if ssh had a switch for the same.</p>
<p>Unfortunately I can&#8217;t locate anything in the man pages for ssh</p>
<p>BTW I&#8217;m using -<br />$ ssh -V<br />OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0&#215;0090701f<br />$ </p>
<p>Thanks for your help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: systemsboy</title>
		<link>http://systemsboy.com/2006/07/send-remote-commands-via-ssh.html/comment-page-1#comment-430</link>
		<dc:creator>systemsboy</dc:creator>
		<pubDate>Tue, 14 Nov 2006 18:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://systemsboy.com/2006/07/send-remote-commands-via-ssh/#comment-430</guid>
		<description>Ashley,&lt;br /&gt;&lt;br /&gt;Excellent! Thank you!&lt;br /&gt;&lt;br /&gt;-systemboy</description>
		<content:encoded><![CDATA[<p>Ashley,</p>
<p>Excellent! Thank you!</p>
<p>-systemboy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ashley</title>
		<link>http://systemsboy.com/2006/07/send-remote-commands-via-ssh.html/comment-page-1#comment-429</link>
		<dc:creator>ashley</dc:creator>
		<pubDate>Tue, 14 Nov 2006 18:05:00 +0000</pubDate>
		<guid isPermaLink="false">http://systemsboy.com/2006/07/send-remote-commands-via-ssh/#comment-429</guid>
		<description>&lt;a href=&quot;http://www.ucolick.org/~sla/ssh/sshcron.html&quot;&gt;Here&lt;/a&gt; you have some info about how to set up the  ssh connection using keys with restrictions:&lt;br /&gt;&lt;br /&gt;command=&quot;/path/to/ilium/rdistd -S&quot; NNNN MM 89012[bulk still gone for the sake of example]34567 priam@sparta&lt;br /&gt;&lt;br /&gt;so that only a certain command be called while using this key. very neat.</description>
		<content:encoded><![CDATA[<p><a href="http://www.ucolick.org/~sla/ssh/sshcron.html">Here</a> you have some info about how to set up the  ssh connection using keys with restrictions:</p>
<p>command=&#8221;/path/to/ilium/rdistd -S&#8221; NNNN MM 89012[bulk still gone for the sake of example]34567 priam@sparta</p>
<p>so that only a certain command be called while using this key. very neat.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: systemsboy</title>
		<link>http://systemsboy.com/2006/07/send-remote-commands-via-ssh.html/comment-page-1#comment-428</link>
		<dc:creator>systemsboy</dc:creator>
		<pubDate>Fri, 21 Jul 2006 23:10:00 +0000</pubDate>
		<guid isPermaLink="false">http://systemsboy.com/2006/07/send-remote-commands-via-ssh/#comment-428</guid>
		<description>Ach! Nein! I can&#039;t read those pages! (Well, most of them anyway.)&lt;br/&gt;&lt;br/&gt;I&#039;m glad I&#039;m not the only one who was unaware of this SSH superpower. Maybe it&#039;s just one of those things everyone already knows. But man is it handy!&lt;br/&gt;&lt;br/&gt;-systemsboy</description>
		<content:encoded><![CDATA[<p>Ach! Nein! I can&#8217;t read those pages! (Well, most of them anyway.)</p>
<p>I&#8217;m glad I&#8217;m not the only one who was unaware of this SSH superpower. Maybe it&#8217;s just one of those things everyone already knows. But man is it handy!</p>
<p>-systemsboy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matx</title>
		<link>http://systemsboy.com/2006/07/send-remote-commands-via-ssh.html/comment-page-1#comment-427</link>
		<dc:creator>matx</dc:creator>
		<pubDate>Fri, 21 Jul 2006 21:24:00 +0000</pubDate>
		<guid isPermaLink="false">http://systemsboy.com/2006/07/send-remote-commands-via-ssh/#comment-427</guid>
		<description>I think I found the origin of that info that &quot;Rambo&quot; sourced.  It&#039;s half in German and half in English, but all good stuff.&lt;br/&gt;&lt;br/&gt;http://www.akadia.com/services/unix_tools.html</description>
		<content:encoded><![CDATA[<p>I think I found the origin of that info that &#8220;Rambo&#8221; sourced.  It&#8217;s half in German and half in English, but all good stuff.</p>
<p><a href="http://www.akadia.com/services/unix_tools.html" rel="nofollow">http://www.akadia.com/services/unix_tools.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
