<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web2.0 Tutorials &#187; command</title>
	<atom:link href="http://www.zulutown.com/blog/tag/command/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zulutown.com/blog</link>
	<description>All the Guides You Need to Become a Web2.0 Expert</description>
	<lastBuildDate>Mon, 13 Jul 2009 07:50:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Executing Commands and Scripts Remotely with ssh</title>
		<link>http://www.zulutown.com/blog/2009/02/13/executing-commands-and-scripts-remotely-with-ssh/</link>
		<comments>http://www.zulutown.com/blog/2009/02/13/executing-commands-and-scripts-remotely-with-ssh/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 22:17:11 +0000</pubDate>
		<dc:creator>Zulutown Webmaster</dc:creator>
				<category><![CDATA[Linux / Unix]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[remotely]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.zulutown.com/blog/?p=76</guid>
		<description><![CDATA[Often it&#8217;s required to execute on a remote server a command or a whole bash script.
Not everyone knows that through ssh it&#8217;s possible to execute this task.
Here&#8217;s the ssh syntax:
usage: ssh [-1246AaCfgKkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]
           [-D [bind_address:]port] [-e escape_char] [-F configfile]
    [...]]]></description>
			<content:encoded><![CDATA[<p>Often it&#8217;s required to execute on a remote server a command or a whole bash script.<br />
Not everyone knows that through <code>ssh</code> it&#8217;s possible to execute this task.</p>
<p>Here&#8217;s the ssh syntax:</p>
<pre>usage: ssh [-1246AaCfgKkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]
           [-D [bind_address:]port] [-e escape_char] [-F configfile]
           [-i identity_file] [-L [bind_address:]port:host:hostport]
           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
           [-R [bind_address:]port:host:hostport] [-S ctl_path]
           [-w local_tun[:remote_tun]] [user@]hostname [command]</pre>
<p>In the following example , the <code>ls</code> command is run on the remote server.</p>
<pre>ssh remoteuser@remoteserver.com ls</pre>
<p>To run a local script on the remote server, it&#8217;s required to upload it (through <code>scp</code>), set it as executable and finally run it.</p>
<p>The related example:</p>
<pre>scp myscript.sh remoteuser@remoteserver.com:/remotedir/myscript.sh
ssh remoteuser@remoteserver.com "chmod +x /remotedir/myscript.sh"
ssh remoteuser@remoteserver.com /remotedir/myscript.sh</pre>
<p>Of course it&#8217;s required to type the password after each command (or to use a identity key file)</p>
<p>Looking through the <code>ssh</code> options it&#8217;s possible to find many other feature offered by this common command.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zulutown.com/blog/2009/02/13/executing-commands-and-scripts-remotely-with-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
