<?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; copying</title>
	<atom:link href="http://www.zulutown.com/blog/tag/copying/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>Copying Files between Clients and Servers over ssh using scp</title>
		<link>http://www.zulutown.com/blog/2009/02/07/copying-files-between-clients-and-servers-over-ssh-using-scp/</link>
		<comments>http://www.zulutown.com/blog/2009/02/07/copying-files-between-clients-and-servers-over-ssh-using-scp/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 12:52:58 +0000</pubDate>
		<dc:creator>Zulutown Webmaster</dc:creator>
				<category><![CDATA[Linux / Unix]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[copying]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[recursively]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[scp]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[transfer]]></category>

		<guid isPermaLink="false">http://www.zulutown.com/blog/?p=73</guid>
		<description><![CDATA[It&#8217;s quite common to need to upload or download file between one or more servers and the local computer.
If it&#8217;s available a ssh access on the servers, using scp to transfer file from and to the server could be a very good option.
Here&#8217;s its syntax:
usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
   [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s quite common to need to upload or download file between one or more servers and the local computer.</p>
<p>If it&#8217;s available a <em>ssh access</em> on the servers, using <code>scp</code> to transfer file from and to the server could be a very good option.</p>
<p>Here&#8217;s its syntax:</p>
<pre>usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
           [-l limit] [-o ssh_option] [-P port] [-S program]
           [[user@]host1:]file1 ... [[user@]host2:]file2</pre>
<p>A very simple example:</p>
<pre>scp localfilename.txt remoteuser@www.remotehost.com:remotefilename.txt</pre>
<p>The previous example copies <code>localfilename.txt</code> from the local directory to the server <code>www.remotehost.com</code> using <code>remoteuser</code> as the ssh account to authenticate on the remote server. On the remote server the transferred file will be stored as <code>remotefilename.txt</code> in the default login directory of <code>remoteuser</code>.</p>
<p>Copying file from and to specific directories:</p>
<pre>scp /localdir/localfilename.txt remoteuser@www.remotehost.com:/remotedir/remotefilename.txt</pre>
<p>Compared to the previous example, in this case, the file is taken from <code>/localdir/localfilename.txt</code> and stored remotely on <code>/remotedir/remotefilename.txt</code>.<br />
Obviously <code>remoteuser</code> should have write permission on the remote directory where the file is going to be written.</p>
<p>In the next case, the authentication is made through a keyfile, this is the syntax:</p>
<pre>scp -i keyfile /localdir/localfilename.txt remoteuser@www.remotehost.com:/remotedir/remotefilename.txt</pre>
<p>In this case to login as <code>remoteuser</code> there will not be a prompt for password, but <code>keyfile</code> is used as identity file.</p>
<p>It&#8217;s even possible to copy directly files from one server to another</p>
<pre>scp firstremoteuser@www.firstserver.com:/filename.txt anotherremoteuser@www.anotherserver.com:/remotedir/remotefilename.txt</pre>
<p>Finally one of the best features is to copy recursively directory trees to the remote server:</p>
<pre>scp -r /localdirectory remoteuser@www.remoteserver.com:/remotedirectory</pre>
<p>In this case, the whole content of localdirectory is recursively copied into remotedirectory. This can be very useful for moving quickly website structures.<br />
I hope you&#8217;ve found some useful information in this tutorial.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zulutown.com/blog/2009/02/07/copying-files-between-clients-and-servers-over-ssh-using-scp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
