<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.completenoobs.com/noobs/index.php?action=history&amp;feed=atom&amp;title=SCP_Basics</id>
	<title>SCP Basics - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.completenoobs.com/noobs/index.php?action=history&amp;feed=atom&amp;title=SCP_Basics"/>
	<link rel="alternate" type="text/html" href="https://www.completenoobs.com/noobs/index.php?title=SCP_Basics&amp;action=history"/>
	<updated>2026-05-01T02:10:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://www.completenoobs.com/noobs/index.php?title=SCP_Basics&amp;diff=557&amp;oldid=prev</id>
		<title>AwesomO: Created page with &quot;==Transferring files with SCP==  The Secure Copy Protocol (SCP) is a useful tool for transferring files between your local machine and a remote server using SSH. SCP ensures that the data is encrypted during transit, providing a secure and efficient way to transfer files.  ===Install an SCP client===   Most Unix-based systems, including Linux and macOS, have an SCP client pre-installed. For Windows, you can use the built-in SCP client included with the OpenSSH package (a...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.completenoobs.com/noobs/index.php?title=SCP_Basics&amp;diff=557&amp;oldid=prev"/>
		<updated>2025-06-03T22:11:44Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Transferring files with SCP==  The Secure Copy Protocol (SCP) is a useful tool for transferring files between your local machine and a remote server using SSH. SCP ensures that the data is encrypted during transit, providing a secure and efficient way to transfer files.  ===Install an SCP client===   Most Unix-based systems, including Linux and macOS, have an SCP client pre-installed. For Windows, you can use the built-in SCP client included with the OpenSSH package (a...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Transferring files with SCP==&lt;br /&gt;
&lt;br /&gt;
The Secure Copy Protocol (SCP) is a useful tool for transferring files between your local machine and a remote server using SSH. SCP ensures that the data is encrypted during transit, providing a secure and efficient way to transfer files.&lt;br /&gt;
&lt;br /&gt;
===Install an SCP client=== &lt;br /&gt;
&lt;br /&gt;
Most Unix-based systems, including Linux and macOS, have an SCP client pre-installed. For Windows, you can use the built-in SCP client included with the OpenSSH package (available in Windows 10 and later) or a third-party client like WinSCP.&lt;br /&gt;
&lt;br /&gt;
===Transfer a file from your local machine to a remote server===&lt;br /&gt;
&lt;br /&gt;
To copy a file from your local machine to a remote server, use the following command:&lt;br /&gt;
* Note the use of the upper case &amp;#039;&amp;#039;&amp;#039;-P&amp;#039;&amp;#039;&amp;#039; for ports with &amp;#039;&amp;#039;&amp;#039;scp&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;code&amp;gt;scp -P port local_file_path username@hostname_or_IP:remote_file_path&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace port with the SSH port number (if different from the default 22), local_file_path with the path to the file on your local machine, username with your username on the remote server, hostname_or_IP with the server&amp;#039;s hostname or IP address, and remote_file_path with the desired location on the remote server.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;scp -P 22 /home/john/documents/report.pdf john@example.com:/home/john/reports/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This command will copy the &amp;quot;report.pdf&amp;quot; file from the local machine to the &amp;quot;reports&amp;quot; directory on the remote server.&lt;br /&gt;
&lt;br /&gt;
===Transfer a file from a remote server to your local machine===&lt;br /&gt;
To copy a file from a remote server to your local machine, use the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;scp -P port username@hostname_or_IP:remote_file_path local_file_path&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Replace port with the SSH port number (if different from the default 22), username with your username on the remote server, hostname_or_IP with the server&amp;#039;s hostname or IP address, remote_file_path with the path to the file on the remote server, and local_file_path with the desired location on your local machine.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;scp -P 2222 john@example.com:/home/john/reports/report.pdf /home/john/documents/&amp;lt;/code&amp;gt;&lt;br /&gt;
: Or&lt;br /&gt;
&amp;lt;code&amp;gt;scp john@example.com:/home/john/reports/report.pdf /home/john/documents/&amp;lt;/code&amp;gt;-&lt;br /&gt;
&lt;br /&gt;
This command will copy the &amp;quot;report.pdf&amp;quot; file from the remote server&amp;#039;s &amp;quot;reports&amp;quot; directory to the &amp;quot;documents&amp;quot; directory on your local machine.&lt;br /&gt;
&lt;br /&gt;
===Transferring directories=== &lt;br /&gt;
&lt;br /&gt;
To transfer an entire directory, use the &amp;#039;&amp;#039;&amp;#039;-r&amp;#039;&amp;#039;&amp;#039; flag:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;scp -r -P port local_directory_path username@hostname_or_IP:remote_directory_path&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, to copy a directory from the remote server to your local machine:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;scp -r -P port username@hostname_or_IP:remote_directory_path local_directory_path&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using SCP is a convenient and secure way to transfer files between your local machine and a remote server. It leverages the security of the SSH protocol to ensure that your data remains encrypted during transit.&lt;br /&gt;
&lt;br /&gt;
===Transferring from Remote Computer to Remote Computer===&lt;br /&gt;
&lt;br /&gt;
Copy the file &amp;#039;&amp;#039;&amp;#039;stuff.txt&amp;#039;&amp;#039;&amp;#039; from remote host &amp;#039;&amp;#039;&amp;#039;12.34.56.67&amp;#039;&amp;#039;&amp;#039; to host &amp;#039;&amp;#039;&amp;#039;11.22.33.44&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;scp name@12.34.56.67:/home/user/Documents/stuff.txt name@11.22.33.44:/home/user/Documents/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the &amp;#039;&amp;#039;&amp;#039;-3&amp;#039;&amp;#039;&amp;#039; flag copies between two remote hosts &amp;quot;12.34.56.67&amp;quot; and &amp;quot;11.22.33.44&amp;quot; are transferred through the local host running the command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;scp -3 name@12.34.56.67:/home/user/Documents/stuff.txt \ name@11.22.33.44:/home/user/Documents/ &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Transferring multiple files===&lt;br /&gt;
&lt;br /&gt;
Send files foo.txt and bar.txt to remote.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;scp foo.txt bar.txt user@12.34.56.78:~/Documents/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy multiple files from remote &amp;quot;Documents&amp;quot; directory to local &amp;quot;Documents&amp;quot; directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;scp user@11.22.33.44:/home/user/Documents/\{todo_list.txt,links.txt,stuff.txt\} /home/$USER/Documents/&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Copy multiple files from the remote to local current directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;scp name@12.34.56.78:~/\{README.md,.bashrc\} . &amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>AwesomO</name></author>
	</entry>
</feed>