In this activity we use a standard client program called telnet to access a server over the internet.
In addition to the Solution document, you will need to have the the telnet program, which is supplied as standard on most platforms. There is no additional Java code provided for this activity.
To use the telnet program as a means of contacting servers over the internet.
You will need to be connected to the internet before you begin. Open a command prompt window (on Windows you would typically do this by clicking Start, then Programs, Accessories, Command Prompt, but the exact details may vary depending on your operating system.) At the prompt type telnet HOSTNAME and then press enter - where HOSTNAME should be the URL of a host that accepts telnet requests. There are fewer hosts available now than in the early days of the internet, so do not be surprised if some you try are no longer working. A list of sites that may work can be found by googling, for example there were some listed at telnet.org when we last checked.
telnet stands for Terminal Emulation Network software and was at one time (before the Web) a common way of accessing resources on remote computer systems. With the wide availability of the Web and increasing concern about security, many sites no longer offer telnet access and ssh has become more common. Don't worry if you don't manage to connect to a telnet site; you won't need to be able to do this for M257.
If you successfully connect to a site, you should see some sort of information in the command prompt window - perhaps just that, or perhaps an invitation to select further options from a menu by pressing a particular key. You can explore this as much or as little as you like - the point of this exercise is to explore connecting to a server using the telnet client.
When you quit from a particular site, or when the site disconnects you, there will normally be a message such as "connection to host lost". You can then return to step 1 and try another site if you wish.
To enable telnet on Vista or Windows 7 you
may need to
do the following:
From your Windows Start button, select Control Panel, click Programs and features, and then click Turn Windows features on or off. (Enter a password or provide confirmation if asked to do so.)
In Windows Features tick the check box for Telnet Client.
Click OK and wait for the installation to complete.
In Windows XP the telnet client is normally
enabled by default.