http://wiki.ljackson.us/index.php?title=Secure_Copy_SCP&action=history&feed=atom Secure Copy SCP - Revision history 2024-03-28T22:15:33Z Revision history for this page on the wiki MediaWiki 1.7.1 http://wiki.ljackson.us/index.php?title=Secure_Copy_SCP&diff=2361&oldid=prev Ljackson: /* See Also */ 2007-05-15T20:44:54Z <p><span class="autocomment">See Also</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 20:44, 15 May 2007</td> </tr> <tr><td colspan="2" align="left"><strong>Line 134:</strong></td> <td colspan="2" align="left"><strong>Line 134:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">== See Also ==</td><td> </td><td style="background: #eee; font-size: smaller;">== See Also ==</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">* [[Dedicated Bittorrent Server]] - See SCP in use.</td><td colspan="2">&nbsp;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">* [[Public Key Authentication]] - Use SCP without having to deal with passwords.</td><td> </td><td style="background: #eee; font-size: smaller;">* [[Public Key Authentication]] - Use SCP without having to deal with passwords.</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> </table> Ljackson http://wiki.ljackson.us/index.php?title=Secure_Copy_SCP&diff=2015&oldid=prev Ljackson at 21:39, 7 March 2007 2007-03-07T21:39:20Z <p></p> <p><b>New page</b></p><div>== Summary ==<br /> Secure Copy is the quickest, most effect way to transfer data from one machine to another. It's speeds surpass that of SFTP by far, but still are encyrpted with a rock solid algorithm. It may seem a little tricky at first, but it can prove to be quite useful, especially if you can utilize bash scripting.<br /> <br /> == Requirements ==<br /> <br /> === Linux ===<br /> <br /> Secure Copy comes standard and can be executed by the command below:<br /> <br /> scp<br /> <br /> === Mac OS X ===<br /> <br /> Secure Copy comes standard and can be executed by the command below:<br /> <br /> scp<br /> <br /> === Mac OS X (GUI) ===<br /> <br /> There is no built-in Graphical User Interface (GUI) client for '''scp''' on Mac OS X.<br /> <br /> '''Requirements'''<br /> <br /> * Mac OS X<br /> * Fugu GUI SCP Client - [http://rsug.itd.umich.edu/software/fugu/ Download]<br /> <br /> '''Install Fugu'''<br /> <br /> [[Image:fugu_connect_info.png|frame|right|Fugu Screenshot]]<br /> <br /> Installing .DMG Applications on Mac OS X is very simple. Simply drag the icon from the .DMG image window into your Applications folder and you are done.<br /> <br /> '''Connecting'''<br /> <br /> Once you have installed Fugu simply enter the information into the fields provided.<br /> <br /> * '''Connect''': Server Address<br /> * '''User Name''': Login ID<br /> * '''Port''': SCP port number (Default port 22)<br /> * '''Directory''': Starting directory (Optional)<br /> <br /> After you click connect Fugu will attempt to authenticate with the server based on the servers installed mechanisms. This simply means that if you are not using [[Public Key Authentication]] it will fall back to password authentication and prompt you for your password.<br /> <br /> === Windows XP ===<br /> <br /> While not native to Windows, there is a Windows program that acts the same called '''pscp''', which is created by the same people who distribute [[Terminal Windows XP|PuTTY]] - &quot;[http://www.putty.nl/download.html www.putty.nl]&quot;.<br /> <br /> To install on Windows, download and save ''pscp.exe'' to ''C:\WINDOWS\''. This way you can type '''pscp''' in any folder and still have access to it. '''If you are using pscp, please remember throughout this guide to replace ''scp'' with ''pscp''!'''<br /> <br /> Some drawbacks to the windows version of pscp:<br /> * Does not support files over 2GB. It doesn't tell you, either, it just corrupts the file.<br /> * Does not transfer as quickly as scp.<br /> * Does not support spaces of any type in file names (quotations won't save you this time!)<br /> <br /> === Windows XP (GUI) ===<br /> <br /> [[Image:Winscp_connect.JPG|thumb|400px|WinSCP Screenshot]]<br /> <br /> There is no built-in Graphical User Interface (GUI) client for '''scp''' on Windows XP.<br /> <br /> '''Requirements'''<br /> <br /> * Windows XP<br /> * WinSCP Client - [http://winscp.net/eng/download.php Download]<br /> <br /> '''Install WinSCP'''<br /> <br /> Once the executable is finished downloading simple follow the dialog boxes to install the software on your computer.<br /> <br /> '''Connecting'''<br /> <br /> Once you have installed WinSCP simply enter the information into the fields provided.<br /> <br /> * '''Host name''': Server Address<br /> * '''Port''': SCP port number (Default port 22)<br /> * '''User Name''': Login ID<br /> * '''Password''': Password<br /> * '''Private key file''': Path to your private key (Optional)<br /> * '''SFTP, SFTP (SCP Fallback), SCP'''<br /> <br /> Once you click '''Login''' WinSCP will authenticate with the server and bring up an window displaying the current files on the server.<br /> <br /> == Examples ==<br /> <br /> === Uploading ===<br /> <br /> To put a file in your home directory on the server:<br /> scp local_file.txt user@server.com:<br /> <br /> To send a file to a specific directory:<br /> scp local_file.txt user@server.com:/directory/to/folder/you/want/it/to/go/<br /> <br /> To put the file on the server in a subfolder of your home dir named &quot;downloads&quot;, the command would be:<br /> scp local_file.txt user@server.com:downloads/<br /> <br /> Notice the difference between the last two. When going to a folder that does not reside within your home dir, you must start with the root directory and give a full path. When you are adding stuff to your home folder, you do NOT start with a root directory! (Root directory is the ''forward slash'' to the very left of the path.)<br /> <br /> (The following tip does not work from pscp, ONLY scp): If your local username is the same as the remove username, you can omit your login name from the command. For instance, if your local login is jwatt and your remove login is jwatt, you can take this command:<br /> scp local_file.mp3 jwatt@gtwy.net:music/<br /> and simplify it, turning it into:<br /> scp local_file.mp3 gtwy.net:music/<br /> This doesn't work on Windows because local Windows users are different than linux users.<br /> <br /> To upload a directory to a webserver, you use the recursive switch '''-r''':<br /> scp '''-r''' local_folder/ user@server.com:/path/to/wherever/<br /> After uploading, the folder location will be:<br /> /path/to/wherever/local_folder/<br /> <br /> === Downloading ===<br /> To download the file &quot;serials.txt&quot; from your remote home dir to the local computer:<br /> scp user@server.com:serials.txt .<br /> <br /> To download the remote file &quot;something&quot; using it's full path to your local computer:<br /> scp user@server.com:/path/to/file/something.txt .<br /> <br /> Now the tricky part: using the recursive switch ('''-r''') to download a whole folder to your local computer. The issue you may have is that you DO NOT place a trailing ''forward slash'' after the directory name. For instance, this command will NOT work (notice the bold ''forward slash''):<br /> scp -r user@server.com:/path/to/directory/ .<br /> This will give you a message saying the server is trying to write to the parent directory. REMOVE the last ''foward slash'' on the path and try again. The next command is CORRECT:<br /> scp -r user@server.com:/path/to/directory .<br /> <br /> I have been using a period when talking about downloading so far. Reason: this brings the file into the directory you are currently in. If you wish to take the last command and download it to somewhere else, the command would be:<br /> scp -r user@server.com:/path/to/directory /new/local/location/<br /> <br /> === Escaping Spaces ===<br /> <br /> Below is an example of how to work with spaces in directory structure:<br /> <br /> scp user@server.ext:'/home/samba/Service\ Deliver/System\ Admin/file\ name.sxw' .<br /> <br /> == Public Key Authentication ==<br /> <br /> If you have many different servers that you have to connect to on a daily basis it may be more effective for you to use [[Public Key Authentication]]. With this feature enabled you are able to securely authenticate to servers with out typing in a password. Unfortunately in order to use it you will have to configure you server and client to support it.<br /> <br /> == See Also ==<br /> <br /> * [[Dedicated Bittorrent Server]] - See SCP in use.<br /> * [[Public Key Authentication]] - Use SCP without having to deal with passwords.<br /> <br /> == External Links ==<br /> <br /> * [http://www.putty.nl/download.html www.putty.nl]<br /> <br /> [[Category:Mac OS X]]<br /> [[Category:Linux]]<br /> [[Category:Windows XP]]</div> Ljackson