Remote and Network Computing
telnet and ftp (and their successors)
These two commands (and their secure successors)
have been for decades
the two
fundamental commands of the Internet / remote computing.
-
telnet (host)
- Login to remote host
-
ftp (host)
- Transfer files to/from remote host
With telnet you get a command-line,
with ftp you get a read-write file system.
Origin:
- telnet, 1971
(and here).
- ftp, 1971.
Read-only ftp (File Transfer Protocol)
was what people used to publish files and archives online
before the Web
(http - Hypertext Transfer Protocol).
It is still sometimes found being used for this,
and most browsers should be able
to read files through it.
ftp is now more often used in read-write mode
for
uploading web sites.
e.g. Your web hosting company uses a UNIX server.
You
periodically upload your web site (edited in Windows)
onto it
with ftp.
There are many graphical drag-and-drop ftp clients,
and even programs that
make the site into a full Windows drive.
These two core commands have been replaced by secure versions:
- telnet
->
ssh
- ftp
->
sftp /
scp
(both use ssh)
or
ftps
(uses ssl)
You may or may not be able to remotely ssh or sftp to:
student.computing.dcu.ie
= 136.206.11.245
(CA, on servers subnet)
How to login to Linux at DCU
remote email
use POP3 or IMAP protocol to talk to server:
mailhost.computing.dcu.ie
mail.dcu.ie
When I was an undergraduate in the 1980s:
-
Universities support
their own dial-in access,
since you can't buy such a service anywhere.
-
Nobody in the phone company,
TV, advertising, business, marketing, media,
the press, the government or society at large
has heard of the Internet.
In the Computer Science department of the university,
the Internet is for researchers
and postgraduates,
if they use it at all.
It is not even mentioned
when undergraduates are lectured about
Computer Networks.
(A little-told story is how even many computer-networks researchers
ignored the rise of the Internet.)
If undergraduates find out about it themselves and are interested,
they may be given access by special permission.
-
After you leave college, you try to
piggyback onto old college accounts,
friends and contacts still at college, and so on,
because you can't actually buy Internet access anywhere.
You have to fight hard to get onto this underground
thing that no one has heard of.
Running UNIX GUI applications:
- Using
X-Windows,
you can run
UNIX GUI programs
on a remote UNIX machine.
-
Using X-Win32
or
Cygwin/X,
you can run
UNIX GUI programs
on a remote Windows machine.
I use the following two to run a
Windows GUI with
a UNIX command-line underneath.
My files on the UNIX server
appear as just another read-write Windows drive.
I can use Windows apps to edit them.
And I have a UNIX command-line always open
on which I can run scripts to process them:
-
Using SAMBA,
you can make your local UNIX machine
look like a drive in Windows.
So you can access and edit all your UNIX files using
Windows programs.
-
Using
WebDrive
or
ExpanDrive,
you can make a remote UNIX machine
look like a drive in Windows.
This strategy uses ftp in the background to read-write remote files.
The remote UNIX files
look just like a drive.
All programs are Internet-enabled.
- Windows
(built-in)
has the ability to link to a remote ftp site, but apparently not with a drive letter.
FTP scripting is a good/essential tool for website maintenance.
Say you are working on an offline copy of a website of 10,000 files.
You make changes to 137 files among the 10,000.
You want to upload the 137 new files, but not the entire 10,000.
Drag and drop the 137 to their correct destinations could be quite tedious.
For repetitive tasks, drag-and-drop is not
a better interface than being able to write automated scripts
(this will be a theme of this course).
You can write ftp scripts ("macros") and call them from Shell scripts:
You can also do HTTP GET or POST scripting from the
command-line.
Some tools that do this:
- lynx
- wget
- curl
- Installed on DCU Linux
- dumps to command line by default
- -s for silent mode
- does HTTP GET
- does HTTP POST
Working remotely
Idea: Your files are "on the network" somewhere.
You can access them and make changes to them
from anywhere.
All copies stay in synch.
This is what you actually have within DCU
(can move from terminal to terminal,
accessing files at central server).
The idea is that you would have this at home
(and when travelling etc.) as well.
Simplest solution -
1 copy of files
-
Read files from server,
and copy changed files back to server as you go along.
Can do this with ftp now,
but really need broadband to work with remote files.
Need high-speed broadband to work with large remote files.
More complex solution - 2 copies of files
- Work on machine which has synchronised mirror of server files
- Have to keep copies in synch
-
Synchronise over the network.
Read files from server at start of session,
copy changed files back at end of session.
e.g. Say have broadband modem, always-on:
-
When leave office,
set synchronise program running with home.
By time get home, files are synchronised.
Work on them locally.
- When going back to office,
start synch program again.
By time get in, files are synchronised again.
Or:
- Physically bring laptop
(or flashdrive / external hard disk)
to/from work
to synchronise.