Dump of existing HTML tutorials into docuwiki format by the HTML::WikiConverter::DokuWiki Perl module. Useful for moving things from HTML tutes to the wiki at the SDF wiki. Convert script and source HTML also provided.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
6.5 KiB

====== File Transfer Tutorial ======
This tutorial discusses various ways to get data from and to a local (external) machine into and out of SDF.
==== Contents ====
- [[#intro|Introduction]]
- [[#ftp|FTP]] - File Transfer Protocol
- [[#scp|scp and sftp]] - secure copying and ftp
- [[#ssh|ssh and tar]] - securely copying directories
- [[#pub|Gopher and HTTP]] - using the internet for download
- [[#term|Terminal]] - direct copying via the terminal
- [[#email|E-mail]] - for small files only
- [[#gloss|Glossary]] - explications of terms
==== To Do ====
* x/y/zmodem transfers
* kermit transfers
===== [[|Introduction]] =====
To transport data between SDF and your local (or any other external) machine, there are various ways. Their availability depends on your member level on SDF (see the [[http://sdf.org/index.cgi?faq?MEMBERS|FAQ, MEMBER section]] for more information), the external system, and their connection.
===== [[|FTP - File Transfer Protocol]] =====
[[http://en.wikipedia.org/wiki/File_Transfer_Protocol|FTP (File Transfer Protocol)]] on SDF is available only for **downloading** public files. This is for security reasons. For upload and download of private files, [[#scp|scp and sftp]] must be used. \\ Note: ARPA membership allows for up-&download via FTP; however, it is better to use scp or sftp if possible, as FTP is unencrypted, and your passwords also have to travel in the clear.
For download, point your FTP program to sdf.org and do anonymous FTP to read data (username "anonymous", password "//yourlogin//@sdf.org", or another of your e-mail addresses).
===== [[|scp and sftp]] - secure copying and ftp =====
scp and sftp are secure ways to transfer data between computers, based on ssh (secure shell). If you've only worked with ftp before, you'll be surprised at the ease and benefits to using scp.
Let's say you're logged into sdf and you want to transfer some pictures from your home machine (named foo in this example) to your sdf home directory. You would want to use the following command:
"scp *.jpg me@sdf.org :/your/remote/home/"
Let's break that down
scpThe command itself.*.jpgThe files you want to transfer.me@sdf.orgYour username @ the server you wish to connect to.:/your/remote/home/The directory you'd like to upload it.
Unless you've installed ssh authorization keys, you'll be prompted for your username and password. Afterwhich, you should have output similar to this:
[me@local Pictures]# scp *.jpg me@sdf.org:~/your/remote/home
IMG_016.jpg 100% 1802KB 45.7KB/s 00:39
IMG_017.jpg 100% 1253KB 46.1KB/s 00:40
IMG_018.jpg 100% 1243KB 48.6KB/s 00:25
IMG_020.jpg 100% 1131KB 45.9KB/s 00:39
[foo@local Pictures]#
On SDF, you need to have ARPA membership to be able to use them. Check the manpages of scp and ssh for more information and options to use.
On Windows machines, you can use the [[#putty|PuTTY programs]].
===== [[|ssh and tar]] - securely copying directories =====
The tar archiving tool can be used with ssh to quickly duplicate whole directory trees:
"tar cf - //target_dir// | ssh me@freeshell.org " tar xf - -C ~///path/// ""
Note: this trick requires compatible versions of tar on the local and remote systems
===== [[|Gopher and HTTP - using the internet for download]] =====
To get data out of SDF on a local machine, you can of course publish them on your gopher- or web-site. Please check the [[http://sdf.org/index.cgi?faq?GOPHER|FAQ, GOPHER section]] and the [[http://sdf.org/index.cgi?tutorials/building_a_website| website tutorial]] for information how to set up these sites.
Please note that HTTP traffic is bandwidth limited depending on your membership level; if you go over the quota, your site will be temporarily blocked!
To prevent access by everybody, see the FAQ entry about [[http://sdf.org/index.cgi?faq?WEB?04|password protection]] of websites.
===== [[|Terminal - direct copying via the terminal]] =====
For transferring small amount of text data (scripts, tables, source code snippets), think about copy/paste directly in the terminal! If you are [[http://sdf.org/index.cgi?faq?MEMBERS?01|MetaARPA]], then you can use "screen" and its built-in copy facility to transfer data between different screens.
To append text input in the terminal to a file on SDF, you can open the file on SDF in your favourite [[http://sdf.org/index.cgi?faq?BASICS?09|text editor]]. Or simply use the command "cat >>//file//", send the data to the terminal (via the paste function), and finish with a single line containing only ^D (CTRL-D) - to do that in the terminal, hit RETURN, CTRL-D, RETURN; this will close the standard input the "cat" was reading from.
===== [[|E-mail - for small files only]] =====
If you have to transfer binary data and cannot use scp (because you're not [[http://sdf.org/index.cgi?faq?MEMBERS?01|ARPA]], which is a pity), then you may need to use file transfer via e-mail. For this, you attach the data you want to get into SDF to a message which you send to your address on SDF (//yourlogin//@sdf.org). On SDF, you read the message and save the attachment where you need the data (e.g, in your home directory, from where you can move them using "mv").
This may not work for large attachments, as the e-mail system (everywhere!) was not intended for file transfer. If you have to regularly transfer large files, you should seriously consider becoming ARPA!
===== [[|Glossary]] =====
ARPA and MetaARPAThese are additional [[http://sdf.org/index.cgi?faq?MEMBERS?01|membership]] levels on SDF which allow for more commands and provide more space and the good feeling of supporting [[http://sdf.org|SDF]]!downloadto get data //from SDF// to your local machine; imagine SDF sitting somewhere uphill so that everybody can see it - then you get the data //down// from SDF[[http://www.chiark.greenend.org.uk/~sgtatham/putty|PuTTY]]This is a software suite for Windows machines for ssh and scp connections.[[http://sdf.org|SDF]]Super Dimensional Fortress - if you don't know what that is, then why are you reading this..? //wink//terminalThe equipment used to connect to a computer in text mode (for a more accurate definition see the corresponding [[http://en.wikipedia.org/wiki/Computer_terminal|Wikipedia entry]]), or in a narrower context the window which gives access to a SDF in text mode. If you are using Windows, it may be a telnet window (or better use PuTTY for secure access via ssh - that's even possible without being ARPA), or on a Linux machine an xterm window.uploadto get data //to SDF// from your local machine; see //download//
$Id: filetransfer.html,v 1.17 2020/01/01 22:27:19 niro Exp $