Skip to Main Content
Linux Server Security, Second Edition
book

Linux Server Security, Second Edition

by Michael D. Bauer
January 2005
Intermediate to advanced content levelIntermediate to advanced
544 pages
23h 44m
English
O'Reilly Media, Inc.
Content preview from Linux Server Security, Second Edition
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Intermediate and Advanced SSH
|
137
Note that such a cut and paste will work in any xterm, but for it to work at a tty
(text) console, gpm will need to be running. An alternative approach is to redirect
ssh-agent’s output to a file, make the file executable, and execute the file within your
current shell’s context (Example 4-6).
Once ssh-agent is running and
SSH_AUTH_SOCK and SSH_AGENT_PID have been declared
and exported, it’s time to load your private key. Simply type ssh-add, followed by a
space and the name (with full path) of the private key you wish to load.
You can use ssh-add as many times (to load as many keys) as you like. This is useful
if you have both an RSA and a DSA key pair and access different remote hosts run-
ning different versions of SSH (i.e., some that support only RSA keys and others that
accept DSA keys).
Passphrase-Less Keys for Maximum Scriptability
ssh-agent is useful if you run scripts from a logon session or if you need to run ssh
and/or scp repeatedly in a single session. But what about cron jobs? Obviously, cron
can’t perform username/password or enter a passphrase for PK authentication.
This is the place to use a passphrase-less key pair. Simply run ssh-keygen as described
earlier, but instead of entering a passphrase when prompted, press Enter. You’ll proba- ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux: Powerful Server Administration

Linux: Powerful Server Administration

Uday Sawant, Oliver Pelz, Jonathan Hobson, William Leemans
Linux Server Hacks

Linux Server Hacks

Rob Flickenger
Linux Server Hacks, Volume Two

Linux Server Hacks, Volume Two

William von Hagen, Brian K. Jones

Publisher Resources

ISBN: 0596006705Supplemental ContentCatalog PageErrata