<?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>WiredRevolution.com &#187; scp</title>
	<atom:link href="http://www.wiredrevolution.com/tag/scp/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wiredrevolution.com</link>
	<description>A Bit of Linux Wisdom</description>
	<lastBuildDate>Wed, 18 Jan 2012 22:45:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Securely copy remote files with scp</title>
		<link>http://www.wiredrevolution.com/commands/securely-copy-remote-files-with-scp?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=securely-copy-remote-files-with-scp</link>
		<comments>http://www.wiredrevolution.com/commands/securely-copy-remote-files-with-scp#comments</comments>
		<pubDate>Sat, 27 Sep 2008 17:27:30 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[commands]]></category>
		<category><![CDATA[scp]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://www.wiredrevolution.com/?p=114</guid>
		<description><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/commands_icon.png" width="80" height="69" alt="" title="commands" /><br/>scp allows you to securely copy files locally or remotely across a network. It uses SSH for data transfer and uses the same authentication. If you do not have public key authentication enabled you will be prompted for a password. This basic format for scp is this. scp [options] [[user@]src_host1:]file1 [[user@]dest_host2:]file2 Assuming the remotehost has [...]


Related posts<ol><li><a href='http://www.wiredrevolution.com/system-administration/share-a-remote-filesystem-over-ssh' rel='bookmark' title='Permanent Link: Share a remote filesystem over SSH'>Share a remote filesystem over SSH</a></li>
<li><a href='http://www.wiredrevolution.com/commands/search-for-files-with-the-find-command' rel='bookmark' title='Permanent Link: Search for files with the find command'>Search for files with the find command</a></li>
<li><a href='http://www.wiredrevolution.com/system-administration/how-to-x-session-forwarding-over-ssh' rel='bookmark' title='Permanent Link: How to X session forwarding over SSH'>How to X session forwarding over SSH</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<img src="http://www.wiredrevolution.com/wp-content/uploads/commands_icon.png" width="80" height="69" alt="" title="commands" /><br/><p><strong>scp</strong> allows you to securely copy files locally or remotely across a network. It uses <strong>SSH</strong> for data transfer and uses the same authentication. If you do not have public key authentication enabled you will be prompted for a password.</p>
<p>This basic format for scp is this.</p>
<pre>
scp [options] [[user@]src_host1:]file1 [[user@]dest_host2:]file2
</pre>
<p>Assuming the remotehost has a username which matches username on the local host, this command will copy a a local file into the /tmp directory on remotehost. Notice that the colon separates the host from the location.</p>
<pre>
$ scp file.txt remotehost:/tmp/
</pre>
<p>You will be presented with the real-time statistics about the file transfer.</p>
<pre>
$ scp file.txt remotehost:/tmp/
</pre>
<pre>
file.txt                                      100%   22KB  21.9KB/s   00:00
</pre>
<p>This command is similar but the period instructs the file to be placed in the users home directory.</p>
<pre>
$ scp file.txt remotehost:.
</pre>
<p>You can specify another user and login using their username.  This will copy the file to ryan&#8217;s home directory.</p>
<pre>
$ scp file.txt ryan@remotehost:.
</pre>
<p>Alternatively you can copy a remote file to your local host. The period in the destination path refers to the current working directory in this case.</p>
<pre>
$ scp ryan@remotehost:file.txt .
</pre>
<p>Likewise, you can copy to any other local path you have access, such as the /tmp directory.</p>
<pre>
$ scp ryan@remotehost:file.txt /tmp/
</pre>
<p>Copying directories is similar except that the &#8216;-r&#8217; option is required. This command will copy a directory from the current working directory to the users home directory on remotehost.</p>
<pre>
$ scp -r mydir/ remotehost:.
</pre>
<p>You can even copy from one remote host to another.</p>
<pre>
$ scp remotehost1:file.txt remotehost2:file.txt
</pre>
<p>Use the -p option to preserve modification times, access times, and modes from the original file.</p>
<pre>
$ scp -p remotehost1:/tmp/file.txt remotehost2:/tmp/file.txt
</pre>


<p>Related posts<ol><li><a href='http://www.wiredrevolution.com/system-administration/share-a-remote-filesystem-over-ssh' rel='bookmark' title='Permanent Link: Share a remote filesystem over SSH'>Share a remote filesystem over SSH</a></li>
<li><a href='http://www.wiredrevolution.com/commands/search-for-files-with-the-find-command' rel='bookmark' title='Permanent Link: Search for files with the find command'>Search for files with the find command</a></li>
<li><a href='http://www.wiredrevolution.com/system-administration/how-to-x-session-forwarding-over-ssh' rel='bookmark' title='Permanent Link: How to X session forwarding over SSH'>How to X session forwarding over SSH</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wiredrevolution.com/commands/securely-copy-remote-files-with-scp/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

