serverapps:security:ssh
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン最新のリビジョン両方とも次のリビジョン | ||
serverapps:security:ssh [2022/11/06 14:34] – [ポートフォワード] hayashi | serverapps:security:ssh [2024/02/02 02:47] – [パスワードログインを禁止] hayashi | ||
---|---|---|---|
行 16: | 行 16: | ||
ProxyCommand | ProxyCommand | ||
</ | </ | ||
+ | |||
+ | ===== ssh-agent ===== | ||
+ | 通常は.bashrcなどに記述するが、tcshなども利用しているので以下のスクリプトを作成 | ||
+ | < | ||
+ | #!/bin/sh | ||
+ | # for ssh-agent | ||
+ | cd ~ | ||
+ | if [ -f ~/ | ||
+ | . ~/ | ||
+ | fi | ||
+ | if [ -z " | ||
+ | / | ||
+ | . ~/ | ||
+ | fi | ||
+ | ssh-add -l > /dev/null 2>&1 || ssh-add | ||
+ | </ | ||
===== rootログインの禁止 ===== | ===== rootログインの禁止 ===== | ||
行 73: | 行 89: | ||
FreeBSDは標準でPasswordAuthentication を禁止しているがChallengeResponseAuthentication は許可されているのでこちらも必ず「No」にしておく。 | FreeBSDは標準でPasswordAuthentication を禁止しているがChallengeResponseAuthentication は許可されているのでこちらも必ず「No」にしておく。 | ||
+ | |||
+ | Ubuntuで「/ | ||
+ | |||
+ | <file / | ||
+ | # | ||
+ | PasswordAuthentication no | ||
+ | </ | ||
==== 公開鍵認証をON ==== | ==== 公開鍵認証をON ==== | ||
serverapps/security/ssh.txt · 最終更新: 2024/02/02 03:28 by hayashi