Skip to Content
Linux クックブック、第 2 版
book

Linux クックブック、第 2 版

by Carla Schroder
May 2025
Intermediate to advanced
544 pages
7h 23m
Japanese
O'Reilly Media, Inc.
Content preview from Linux クックブック、第 2 版

第12章. OpenSSHで安全にリモートアクセスする

この作品はAIを使って翻訳されている。ご意見、ご感想をお待ちしている:translation-feedback@oreilly.com

OpenSSH は 安全なリモート管理のために選ばれたツールである。これは認証とセッション中のすべてのトラフィックを暗号化し、 データ転送の完全性を保証する。パケットを変更するようなことが起きたら、SSHが教えてくれる。この章では、リモートホストへのSSHアクセスをセットアップする方法、SSH暗号化キーを管理する方法、複数のリモートホストへのログインを設定する方法、SSHセッションであることを示すためにbashプロンプトをカスタマイズする方法、その他いろいろなことを学ぶ。

OpenSSH は という多数の強力な暗号化アルゴリズムをサポートしている。OpenSSH チームは、OpenSSH の中に特許やその他の問題を抱えたコードが 入らないようにするために、多大な努力を払っているからです。レシピ 12.16に、サポートされているすべてのアルゴリズムのリストを表示する方法を 示します。

OpenSSHは 、リモート転送ユーティリティのスイートである:

  • sshd、 OpenSSHサーバデーモン。

  • sshはセキュア・シェルの略で、 、実際にはシェルを含まないが、リモート・システム上のコマンド・シェルへの安全なチャネルを提供する。

  • scp、セキュアコピー、暗号化されたファイル転送を行う。

  • sftp(Secure File Transfer Protocol)は、ファイルアクセスを提供する。

  • ssh-copy-id,リモートSSHサーバのauthorized_keysファイルに公開鍵をインストールするためのちょっといいプログラム。

  • ssh-keyscan は、 を発見し、ネットワーク上の公開ホスト鍵を収集することで、手動で探し出す手間を省く。

  • ssh-keygen、認証キーを生成・管理する。

  • ssh-addは、認証エージェントssh-agentに 、IDを追加する。

この章では、sshsshdssh-copy-idssh-keygen、そして2つの便利な関連ユーティリティ、sshfsとssh-agentについて学ぶ。

sshfsは、 リモートファイルシステムをローカルPCにマウントする。ssh-agentは、自動認証のために複数のSSHログインにわたって、あなたの秘密鍵のパスフレーズを 覚えている。ssh-agentは単一のログインセッションにバインドするので、ログアウトしたり、別のターミナルを開いたりすると、最初からやり直すことになる。自動演算子のためのより良いユーティリティは、ssh-agentのフロントエンドである Keychainである。Keychainはマシンを再起動するまでssh-agentを再利用するので、パスフレーズを入力するのは の起動時だけでよい(レシピ12.10を参照)。

OpenSSHは異なるタイプの認証をサポートしている:

パスワード認証

Linuxのログイン名とパスワードを認証に使う。どのマシンからでもログインできるので、最もシンプルで柔軟性が高い。注意しなければならないのは、図書館やインターネットカフェのような、信頼できないコンピューターからSSHセッションを開かないことだ。もしキーロガーに感染していたら、あなたの資格情報をキャプチャされてしまう。

公開鍵認証

個人のSSH公開鍵で認証する。 ...

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

Pythonデータサイエンスハンドブック 第2版 ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習

Pythonデータサイエンスハンドブック 第2版 ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習

Jake VanderPlas, 菊池 彰
Bash クックブック第2版

Bash クックブック第2版

Carl Albing, JP Vossen
行動を変えるデザイン ―心理学と行動経済学をプロダクトデザインに活用する

行動を変えるデザイン ―心理学と行動経済学をプロダクトデザインに活用する

Stephen Wendel, 武山 政直, 相島 雅樹, 反中 望, 松村 草也

Publisher Resources

ISBN: 9798341650091