<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>theory | Nicholas Defranco</title><link>https://nicholas-defranco.netlify.app/tag/theory/</link><atom:link href="https://nicholas-defranco.netlify.app/tag/theory/index.xml" rel="self" type="application/rss+xml"/><description>theory</description><generator>Wowchemy (https://wowchemy.com)</generator><language>en-ca</language><copyright>© 2021 Nicholas Defranco</copyright><lastBuildDate>Wed, 24 Mar 2021 18:39:08 +0000</lastBuildDate><image><url>https://nicholas-defranco.netlify.app/media/sharing.png</url><title>theory</title><link>https://nicholas-defranco.netlify.app/tag/theory/</link></image><item><title>SCP</title><link>https://nicholas-defranco.netlify.app/project/scp/</link><pubDate>Wed, 24 Mar 2021 18:39:08 +0000</pubDate><guid>https://nicholas-defranco.netlify.app/project/scp/</guid><description>&lt;p>SCP stands for Secure Copy Protocol. this is a command that uses to transfer files back and forth from a local host to a remote server via SSH command(srikanta, 2016). It runs on session layer and operates on TCP port 22(Techopedia, 2019) and has a RFC number of 4251. SCP works on SSH which offers features such as user verification and many other features which ensures security (Pai, n.d.). The file being transferred and all inputted keystrokes(to input the user&amp;rsquo;s password)are all encrypted (Indiana, 2019). The file transfer process itself is based on the Remote Copy Protocol (RCP) created by the Berkeley Software Distribution (BSD)(Technopedia, 2019). This application is pre-installed on most unix-based operating systems (Pere, 2017).&lt;/p>
&lt;p>SCP works on &amp;ldquo;a single transport connection&amp;rdquo;(Spero, n.d.) making the protocol very efficient. It is efficient as the&lt;/p>
&lt;ul>
&lt;li>remote server does not check for a successful connection meaning the copying process occurs as soon as the connection is successful.&lt;/li>
&lt;li>there is a small amount of wasted storage during the process(Spero, n.d.).&lt;/li>
&lt;/ul>
&lt;p>All information about the file after the copying process has been completed is maintained on the destination machine (the machine that was copied to)(Spero, n.d.).&lt;/p>
&lt;h2 id="advantages-compared-to-sftp">Advantages compared to SFTP&lt;/h2>
&lt;ul>
&lt;li>Simple to use&lt;/li>
&lt;li>useful to transfer especially big sizes in comparing with FTP and Samba Shares&lt;/li>
&lt;li>It’s faster than SFTP AND FTP as all information about the transfer of the files is passed as command-line arguments(Spero n.d.)&lt;/li>
&lt;li>the SCP command is able to transfer files from a local host to a remote server and vice versa unlike SFTP, which can only pull files from a remote server&lt;/li>
&lt;/ul>
&lt;h2 id="disadvantages-compared-to-sftp">Disadvantages compared to SFTP&lt;/h2>
&lt;ul>
&lt;li>Unlike SFTP, SCP not able to remove or list file of directories, it just only read them.&lt;/li>
&lt;li>there is no interaction will the application, unlike SFTP where the user is able to interact between the local host and remote server. Since this is the case it can sometimes be difficult to use the SCP command as you must know the directory tree before hand(techraf, 2016).&lt;/li>
&lt;li>Lacks many features that are offered by SFTP(it can do more than copy)&lt;/li>
&lt;li>Lacks portability, as it is normally built to only work on unix-based machines(Pere, 2017)&lt;/li>
&lt;/ul>
&lt;h2 id="command-line-interfaces-of-scp">Command Line Interfaces of SCP&lt;/h2>
&lt;ul>
&lt;li>RCP: Copies files from remote service&lt;/li>
&lt;li>SLOGIN: Secure logs into the remote system&lt;/li>
&lt;/ul>
&lt;h2 id="example-use-of-scp">Example use of SCP&lt;/h2>
&lt;p>The local host runs the SCP command&lt;/p>
&lt;p>one argument must be the remote server and the other must be the local host. Once a connection is established, SCP will prompt the user to authenticate on the remote server. The authentication process is identical to connected to the server with a secure shell connection(SSH).&lt;/p>
&lt;h3 id="syntax-local-to-remote">Syntax local to remote&lt;/h3>
&lt;pre>&lt;code class="language-bash">scp file user@host:directory
&lt;/code>&lt;/pre>
&lt;h3 id="syntax-remote-to-local">Syntax remote to local&lt;/h3>
&lt;pre>&lt;code class="language-bash">scp user@host:directory file
&lt;/code>&lt;/pre>
&lt;h2 id="extra-information">Extra Information&lt;/h2>
&lt;p>The remote host can be specified by providing the host name or the ip address of the host after the @ symbol(Srikanta, 2016). You are able to copy any amount of files, if the programmer wishes to copy more than one file, the file names must be surrounded by escaped curly brackets(curly braces)(Srikanta, 2016). You are also able to use any metacharacters that allow for any bash expansions to be able to select multiple files.&lt;/p>
&lt;h3 id="copying-multiple-files">Copying multiple files&lt;/h3>
&lt;pre>&lt;code class="language-bash">scp remoteuser@remotehost:\{samplefile1.txt,samplefile2.txt\} .
&lt;/code>&lt;/pre>
&lt;p>(Srikanta, 2016)&lt;/p>
&lt;p>The programmer is free to change the port number to use before performing the secure copy(Srikanta, 2016)&lt;/p>
&lt;h3 id="changing-port-number">Changing port number&lt;/h3>
&lt;pre>&lt;code class="language-bash">scp -P 2345 samplefile.txt remoteuser@remotehost:~
&lt;/code>&lt;/pre>
&lt;p>Examples taken from: &lt;a href="https://qnaplus.com/secure-copy-scp/" target="_blank" rel="noopener">https://qnaplus.com/secure-copy-scp/&lt;/a> and &lt;a href="https://www.hypexr.org/linux_scp_help.php" target="_blank" rel="noopener">https://www.hypexr.org/linux_scp_help.php&lt;/a>&lt;/p>
&lt;p>Protocol stages&lt;/p>
&lt;ul>
&lt;li>Creates a session with an specific code(more specifically an identifier) with a number greater than or equal to 1024. This can be set by the programmer(-P option on the scp command)&lt;/li>
&lt;li>creating a session, a SYN packet is sent to the reciever to initiate the session.&lt;/li>
&lt;li>Once the communication is complete,a FIN packet is sent to the reciever. Both ends will end their communication.&lt;/li>
&lt;li>A PUSH bit is at the end of the message to indicate the end of the message&lt;/li>
&lt;/ul>
&lt;h2 id="works-cited">Works cited&lt;/h2>
&lt;p>(n.d.). What&amp;rsquo;s the difference between SCP and SFTP? Retrieved from &lt;a href="https://superuser.com/questions/134901/whats-the-difference-between-scp-and-sftp" target="_blank" rel="noopener">https://superuser.com/questions/134901/whats-the-difference-between-scp-and-sftp&lt;/a>
What is Secure Copy? - Definition from Techopedia. (n.d.). Retrieved from &lt;a href="https://www.techopedia.com/definition/26142/secure-copy" target="_blank" rel="noopener">https://www.techopedia.com/definition/26142/secure-copy&lt;/a>
Carroll, B. (n.d.). How to use Secure Copy for file transfer. Retrieved from &lt;a href="https://www.techrepublic.com/article/how-to-use-secure-copy-for-file-transfer/" target="_blank" rel="noopener">https://www.techrepublic.com/article/how-to-use-secure-copy-for-file-transfer/&lt;/a>
How to transfer files using SCP (Secure Copy). (n.d.). Retrieved from &lt;a href="https://www.a2hosting.com/kb/getting-started-guide/accessing-your-account/transferring-files-using-scp-secure-copy" target="_blank" rel="noopener">https://www.a2hosting.com/kb/getting-started-guide/accessing-your-account/transferring-files-using-scp-secure-copy&lt;/a>
(n.d.). Retrieved from &lt;a href="https://www.w3.org/Protocols/HTTP-NG/http-ng-scp.html" target="_blank" rel="noopener">https://www.w3.org/Protocols/HTTP-NG/http-ng-scp.html&lt;/a>
Home. (n.d.). Retrieved from &lt;a href="https://www.ssh.com/ssh/scp/" target="_blank" rel="noopener">https://www.ssh.com/ssh/scp/&lt;/a>
Data Migration and File Server Migration Software. (n.d.). Retrieved from &lt;a href="https://www.quest.com/products/secure-copy/" target="_blank" rel="noopener">https://www.quest.com/products/secure-copy/&lt;/a>
Pai, A. (n.d.). Using secure shell (SSH) for login and secure copy (SCP) for data transfer on Linux. Retrieved from &lt;a href="https://www.howtoforge.com/tutorial/ssh-and-scp-with-public-key-authentication/" target="_blank" rel="noopener">https://www.howtoforge.com/tutorial/ssh-and-scp-with-public-key-authentication/&lt;/a>
(n.d.). Retrieved from &lt;a href="https://www.hypexr.org/linux_scp_help.php" target="_blank" rel="noopener">https://www.hypexr.org/linux_scp_help.php&lt;/a>
Srikanta, A. (2016, July 02). What is Secure Copy (SCP)? Retrieved from &lt;a href="https://qnaplus.com/secure-copy-scp/" target="_blank" rel="noopener">https://qnaplus.com/secure-copy-scp/&lt;/a>
Indiana University Indiana University Indiana University. (n.d.). Retrieved from &lt;a href="https://kb.iu.edu/d/agye" target="_blank" rel="noopener">https://kb.iu.edu/d/agye&lt;/a>&lt;/p></description></item></channel></rss>