How to Configure Clients

The clients ssh and scp are quite configurable, with many settings that can be changed to suit your whim. If you want to modify the behavior of these clients, three general techniques are at your disposal:

Command-line options

For changing the behavior of ssh or scp for a single invocation

Configuration keywords

For changes that remain in force until you change them again; these are stored in a client configuration file

Environment variables

For a few miscellaneous features

We now present a general overview of these three methods.

Client configuration (highlighted parts)

Figure 7-1. Client configuration (highlighted parts)

7.1.1 Command-Line Options

Command-line options let you change a client’s behavior just once, at invocation. For example, if you’re using ssh over a slow modem connection, you can tell it to compress the data with the -C command-line option:

    $ ssh -C

ssh, scp, and most of their support programs, when invoked with the --help option, will print a helpful summary describing all their command-line options.[102] For example:

    $ ssh --help
    $ scp --help
    $ ssh-keygen -help

7.1.2 Client Configuration Files

If you don’t want to retype command-line options continually, configuration files let you change a client’s behavior now and in the future, until you change the configuration file again. For example, you can enable compression for all clients you invoke by inserting this line into ...

Get SSH, The Secure Shell: The Definitive Guide, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.