Skip to Content
Linux Server Security, Second Edition
book

Linux Server Security, Second Edition

by Michael D. Bauer
January 2005
Intermediate 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
|
135
There’s one last thing I should mention about Example 4-4. It makes two assump-
tions about the remote server:
That I have the same username as I do locally.
That the remote server recognizes SSH Protocol v2.
If the first assumption isn’t true, I need either to use the
-l flag to specify my user-
name on the remote host or, instead, to use scp-style username@hostname syntax—
e.g.,
mick@zippy.pinheads.com.
If Protocol v2 isn’t supported by the remote sshd daemon, I’ll have to try again with-
out the
-2 flag and let SSH fall back to username/password authentication, unless
I’ve got an RSA key pair whose public key is registered on the remote machine.
To do all this with RSA keys, we follow pretty much the same steps but with differ-
ent filenames:
1. Create an RSA user-key pair with ssh-keygen, for example:
ssh-keygen -b 1024 -C mbauer@homebox.pinheads.com
2. On each remote host to which you wish to connect, copy your public key onto
its own line in the file authorized_keys in your $HOME/.ssh directory. (The
default filenames for RSA keys are identity and identity.pub.)
Again, if you run ssh without the
-2 flag, it will try RSA authentication by default.
What happens if you forget your RSA or DSA key’s passphrase? How will you get
back into the remote machine ...
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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Building Secure Servers with Linux

Building Secure Servers with Linux

Michael D. Bauer
Linux Security Cookbook

Linux Security Cookbook

Daniel J. Barrett, Richard E. Silverman, Robert G. Byrnes

Publisher Resources

ISBN: 0596006705Catalog PageErrata