Connection applications :

One of the foundations of Unix systems is that it is a multiuser system, allowing several users to access the system at the same time. In the early design of the Unix hardware, serial connections where used to connect terminal through devices with a keyboard and a display of some type to the system. Because the only function of these devices was to interface into a remote Unix system, they are often referred to as dumb terminals.

As networking evolved, the practice of allowing terminal devices and even other systems to interface with the Unix system of interest became common. Additionally, personal computers became inexpensive and common and often substituted for the the dumb terminals.

Because the new devices and systems were not specifically designed as terminals for a Unix system, it was necessary to write software that could behave like a terminal. Known as terminal software, two common packages are telnet and ssh.

Some terminology - the machine that you are logging in from (running the terminal emulation software on) is often called the local host and the software itself may referred to as the client software. The Unix machine you wish to contact may be called the remote system (or remote host or server).

  • telnet client - software that emulates a terminal, following a standardized protocol. telnet establishes a connection through the standard ip port 23. The remote system be logged into, is configured to listen at port 23 for users attempting to connect. If a connection is established, the user then goes through the standard login procedures and if successful, the telnet software acts as a terminal. Many systems no longer accept connections via standard telnet because the telnet protocol does not require security practices such as encrypting passwords and data packets. telnet is largely being replaced by ssh.

  • ssh - secure shell client. Similar to telnet except that it provides a number of alternative security methods for establishing a connection and protecting all data between the local host, the machine the user is logging in from, and the remote server, the machine the user wishes to login to. Like telnet, ssh follows an established standard protocol. ssh communicates through port 22 rather than 23 and uses a variety of encryption techniques to protect the data being moved between systems.

    On pcs, the telnet or ssh software is often embedded in a user friendly interface, for example Putty. But many systems may also have a command line version of software. If you have access to another Unix system or if wish to contact our system from another Unix system, you can run ssh from the command prompt.

    #( You may log into lx from lx just to see how this works. In the command below, replace z# with your zid. The general syntax is ssh host_ip -l user_id )

    ssh lx.cs.niu.edu -l z#

    If the system may prompt you about connecting, answer "yes". This is ssh configuring the connection and your account to use encrypted data. Below is from a ssh login on a home machine, but the general structure will be the same on lx. After you have answered yes the first time, later attempts to connect will be able to skip this confirmation and go directly to the passwd prompt.

    johnb@linux-413u:~> ssh linux-413u -l johnb
    
    The authenticity of host 'linux-413u (127.0.0.2)' can't be established.
    RSA key fingerprint is ca:2b:b7:80:05:81:a0:39:75:17:ca:ca:b1:52:15:68.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'linux-413u' (RSA) to the list of known hosts.
    Password:
    
    
    If your login id is the same on the local system as the remote system, you can connect by just specifying the ip or internet name of the remote system.

    ssh max.cs.niu.edu

    When logging in under a different name, you may find that this form of the command may also work :

    ssh t90jxb2@lx.cs.niu.edu

  • stty - set terminal configuration. When a user logs in, the terminal emulation software should correctly negotiate the proper terminal behavior with the remote system. However, because there have been many types of terminals manufactured over the years, it has become necessary to provide a facility to tweak the configuration of the terminal interface.

    Some of the things that a user might wish to customize :

    Which key performs a character delete or erase ? [del], [ctrl]h, [backspace]

    Does the terminal use 7 bit data with a parity bit or use all 8 bits as data?

    How many rows and columns does the terminal display use?

    Should the input be echoed back to the terminal? Some early systems sent data directly to the remote system without displaying it on the terminal, so it was useful to have the remote system send the input back before acting on it.

    The man page for stty is > 300 lines in describing configuration options. Luckily, in most cases, the terminal configuration is set during the terminal login negotiations and is acceptable. Occasionally, if you find a particular feature is wrong or not what you like to use, run stty to tweak the configuration.

    For example, if you like [ctr]h for the backspace and the default is [shift][backspace], you can do the following :

    stty erase [ctrl]v[ctrl]h

    Note you should actually hold down the [ctrl] key and press v for [ctrl]v above. Repeat for [ctrl]h. You will now find that [ctrl]h works.

    Some stty options and arguments :

    stty -a list all setting in a readable form. Although they are readable, many won't make sense until you read the man page.

    stty sane - reset the terminal to a basic valid communication configuration. This command can be useful if your terminal has begun to act strangely. It is simple to type in even if the terminal is not readable.

    Examples of things that can cause a terminal to become misconfigured :

    Data that has been corrupted when transmitted over phone lines can occasionally affect the terminal.

    cat(ing) a file to standard output that has binary data has been known to affect terminal settings.

    While "stty sane" may not always fix the problem, it is a simple action to try before the more drastic action of terminating the connection and logging in again.

  • ftp and sftp - file transfer protocol. ftp allows you to transfer files between local host and a remote server. Like telnet or ssh, you establish a connection by logging into the specified remote server. ftp provides an interactive interface between the systems. In general, ftp does not allow you to run commands on the remote server. But it does allow you to list directories, change to them, and in some case, create them. sftp is a command line version of secure ftp which use encryption on all data transmitted.

    ftp is aware that differences in the storage systems and the representation of data on different systems. In most case, it can correctly translate the data, although in some cases, you may have to manually indicate the nature of the translation.

  • rcp and scp - remote copy. This utility is designed to make copying between Unix systems easier. rsync has replaced rcp on many systems but provides the same service. rsync allows you to provide the name of the file being moved, the name of the remote machine, and if the user id for the remote machine is not the same as the local machine, you may provide that also. scp is a secure version of the same and will provide encryption of any data transmitted. See the man pages for rsync and scp for examples.

    Archiving Utilities
    Command List