Connection applications :

One of the foundations of Unix systems is that it is a multi-user 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 or emulators, 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 data packets being transmitted and received. 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.

    If your user ID is different on the remote system than on the local system, you must include that in the login when invoking ssh. There are two ways to do thi :

    ssh turing.cs.niu.edu -l z912730

    -l allows you specify the user's ID you wish to login as. You must know the correct password for that account

    ssh z912730@turing.cs.niu.edu

    Prepending the remote host's name with user-id@ works for most modern versions of ssh.

    If the system may prompts 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 hopper. 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.

    berezin@turing.cs.niu.edu's password:
    
    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.
    
    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    No mail.
    Last login: Sat Sep  5 08:00:42 2015 from adsl-108-66-52-131.dsl.emhril.sbcglobal.net
    $
    

    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.

  • 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 mis-configured :

    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 - file transfer protocol

  • sftp - secure file transfer protocol

    Like telnet, ftp is often blocked because of lack of packet encryption. Use sftp insteas whereever possible.

    sftp allows you to transfer files between local host and a remote server. Like ssh, you establish a connection by logging into the specified remote server. sftp provides an interactive interface between the systems. In general, sftp 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 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.

  • scp - secure copy and its unencrypted version, rcp. This utility is designed for copying between Unix systems easier. While not as 'friendly' as sftp, it is often much quicker to use and can be used in command scripts.

    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.

    Command List