Introduction to Telnet, FTP, SSH and SCP

What is Telnet?

Telnet is a terminal emulation program for TCP/IP networks such as the Internet. The Telnet program runs on your computer and connects your PC to a server on the network. You can then enter commands through the Telnet program and they will be executed as if you were entering them directly on the server console. This enables you to control the server and communicate with other servers on the network. To start a Telnet session, you must log in to a server by entering a valid username and password. Telnet is a common way to remotely control Web servers. 

Here is a long article describe Telnet in more technical details.

Why would I need it? 

As described above, you may need to use telnet to connect to a remote machine to run commands. Although the command-like interface may seem a bit intimidating to some, there are lots of good books to help you through the process. 

What is FTP?

FTP is the abbreviation of File Transfer Protocol, the protocol used on the Internet for sending files.

Here is a guide of FTP, which provides a comprehensive guide to FTP including sections on software elements, command choices and formats, control connection commands, typical messages, and utilities.

How is Telnet different from FTP? 

Telnet is used for running commands, and FTP is used for transferring files. 

Can I use Telnet and FTP to reach the departmental hosts?

No. The department forbids all remote connections to computers in the cs.uchicago.edu domain to be established using Telnet or FTP.

Why can't I use Telnet and FTP to reach these hosts?

The FTP protocol has been around for a fairly long time, by Internet standards, and has become a popular means to transfer files between Internet hosts. The TELNET and RSH/RLOGIN protocols have also been around for a fairly long time, both permitting remote, interactive logins to Internet hosts.

As the Internet grew and the means to sniff network traffic became more widely available, it became clear that the FTP, TELNET and RSH/RLOGIN protocols all had some shortcomings. Each of these protocols sends the user's password, as well as all data, in the clear over the network wire. This leaves that data traffic in the open and susceptible to interception by third parties.

So, security is the primary reason why you can't use Telnet and FTP to reach these machines.

What alternatives should I use if I want to work remotely or transfer file from/to departmental hosts?

Use Secure SHell (ssh) instead of Telnet.
Use Secure CoPy (SCP) instead of FTP.

What is SSH?

SSH (Secure SHell) is a protocol for remotely logging into a machine via a shell. It is very similar in functionality to telnet, however unlike telnet, all data between the client and server is encrypted. 

Why are we using SSH (restatement)?

The internet was not created with security in mind and most of the traditional ways of communicating between computers do very little to protect that data. Telnet, ftp, and even email all send your username and password over the network in clear, unencrypted text. When you telnet to a remote machine, the information is not sent directly to that machine, it is routed through several machines to get there. In this way, the internet is a lot like a highway system, you don't take one road directly somewhere, instead you use several connecting roads. 
This causes some problems as anyone along the way can easily see what you are sending, much like a person at a rest stop can watch your car go by on the freeway. This means someone can easily grab your username and password to our system. With this, they are free to access our system (through your account). Once this happens, our system is no longer secure. Your files may be modified or deleted or someone may attempt to gain root access to our system where they can do severe damage. This is a very bad thing. 

To protect your account and our system from this threat, we will be requiring the use of SSH instead of telnet. This is the first step in preventing any passwords from being transmitted in clear text over the network. Since SSH encrypts all traffic with a public-private key scheme, only our server can decrypt it and anyone who intercepts the data in transit will have only garbage data. 

What is SCP?

SCP is Secure CoPy, a protocol to allow you to transmit files from one machine to another with the encryption benefits of SSH. Most SSH clients include SCP capability. In the future, we will be disabling FTP due to the same security problems as telnet, and at that time SCP will be one way for you to transfer files between machines. When we get closer to disabling FTP, more information on this will be made available.

What is SSH Tunneling? (You may ignore this section)

Tunneling is a way to use conventional services such as telnet and FTP through an encrypted SSH channel. When you set up an SSH tunnel, you create a secure channel between your machine and a remote machine that any data can be sent through. Thinking back to the freeway analogy, this would be like building a tunnel all the way from your home to your destination and driving through it, preventing anyone from seeing you as you drive. In reality, this would be quite impractical, however it is a simple process with SSH. 

Once your SSH client is configured to tunnel, you will then need to configure your telnet/ftp/email programs to connect to your local machine instead of the remote machine. The SSH program on your machine will accept this connection and forward the data to the remote server through an SSH channel. Once the data arrives on the remote server, it will be unencrypted and forwarded to the local service on the machine. Thus, your client and the remote telnet/ftp/mail server functions normally but all the traffic between the two machines is fully encrypted thus protecting your password. 

More information on setting up a tunnel can be found in the platform specific pages below. 

Where can I get an SSH/SCP program?

SSH/SCP is available for most computing platforms, here we assume most of the students will use Windows-based systems to remotely connect to the departmental machine. The program we recommend is called PuTTY, which is a free implementation of Telnet and SSH for Win32 platforms, along with several other functionalities, including a SCP client named PSCP.  

Here is an introduction of how to use PuTTY to log on to the CS Linux machines. Please check it out! 

Can you give me some examples how to use PuTTY?

If necessary, we will do it in class. 

Do I must get CS account before using PuTTY to log on to the CS Linux machines?

Yes, you must.
For requesting a CS Unix account please visit https://www.cs.uchicago.edu/info/services/account_request.

กก

กก