SSブログ

CopSSH sshd_config [CopSSH]

「C:/Program Files/copSSH/etc/sshd_config」のサンプルです。
気が向いたら、ちょこちょこ加筆修正してきます。

各設定値に関しては、sshd_configの日本語訳を紹介されているサイトででも確認下さい
http://www.unixuser.org/~euske/doc/openssh/jman/sshd_config.html

# $OpenBSD: sshd_config,v 1.74 2006/07/19 13:07:10 dtucker Exp $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/bin:/usr/sbin:/sbin:/usr/bin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.

Port 22
# 使用するポート番号を変えてセキュリティレベルを上げる事を考えてる人も居ますが・・・面倒なのでデフォルト

#Protocol 2,1
Protocol 2
# プロトコル1は、古いプロトコルでセキュリティホールも放置されている状態なので、わざわざ使う必要もないでしょう

#AddressFamily any
ListenAddress 0.0.0.0
#ListenAddress ::
# この辺は適当。IPv6のネットワークを利用する人は注意して下さい。

# HostKey for protocol version 1
#HostKey /etc/ssh_host_key
# HostKeys for protocol version 2
HostKey /etc/ssh_host_rsa_key
#HostKey /etc/ssh_host_dsa_key
# RSA鍵だけを使うように指定しています。DSA鍵はビット数を増やしても暗号化強度は高くならないようです。将来的な強度を考えるのであればRSA鍵でビット数を2048ビット以上にするのが良いらしい(2008年時点の見解)

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 1h
ServerKeyBits 768
# 共通鍵の再生成間隔の指定とか、鍵長とか。もう少し間隔を短く、ビット長を長くしても良いと思いますが・・・デフォルト

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO
LogLevel FATAL
# INFOだと、アプリケーションログにCopSSHのログが大量に出力されて邪魔です。FATALくらいで良いかと。逆に、トラブルが起きた時は、DEBUGとかで解析。(CopSSHではコマンドラインからのsshdの起動が行えないので、ここで設定してOpenSSHDサービスを再起動させてデバッグさせる必要があります)# 誤りでした_(._.)_
# /bin/sshd -p 22 -D -d -e
# とかでデバッグ起動できます(事前に、OpenSSHDサービスは停止させておいてください(2010.06.14修正)


# Authentication:

LoginGraceTime 2m
# デフォルト。もう少し短くても良いかもしれませんが
PermitRootLogin without-password
# 特権ユーザでのログインを許可します。遠隔からサービスの落とし上げを行いたい人は許可して下さい。特権ユーザでのssh通信を予定していない人は、「no」にしておいた方が良いです。公開鍵認証の場合のみ許可するなら、「without-password」当たりが無難かと。
StrictModes yes
# ホームディレクトリの権限や設定ファイルの権限が正しく設定されているか厳密にチェックします。この機能が有効でも無効でも大差ないと思いますが、どちらかといえば有効な方がセキュリティレベルが高いので、「yes」にする人が多いです。
MaxAuthTries 3
# 認証失敗時の最大再試行回数はデフォルトのまま。気になる人は1でも良いかも

RSAAuthentication no
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
# 公開鍵認証を有効化しています。

# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# RhostsRSAやホストベース認証は無効化しています。双方向通信したい場合は、ホストベース認証も設定が楽なんですけどねぇ・・・

# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# RhostsRSA認証もホストベース認証も使わないので関係なし。

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
PermitEmptyPasswords no
# パスワード認証は一応不許可。パスワード認証を利用するのであれば、インターネットに接続しないか、ポート番号を変える等のある程度の対策は取った方が宜しいかと

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
# この辺は、CopSSHでは無縁です(設定できません)

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# この辺は、CopSSHでは無縁です(設定できません)

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
# この辺は、CopSSHでは無縁です(設定できません)

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM no
# この辺は、CopSSHでは無縁です(設定できません)

AllowTcpForwarding no
#GatewayPorts no
X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
# 転送機能はとりあえず無効化。

#PrintMotd yes
#PrintLastLog yes
# デフォルト。出力させるか否かは好みですが・・・Windowsなので表示されないかも(試してないです)

TCPKeepAlive yes
#UseLogin no
UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
UseDNS yes
PidFile /var/run/sshd.pid
#MaxStartups 10
PermitTunnel no

# no default banner path
#Banner /some/path

# override default of no subsystems
Subsystem sftp /bin/sftp-server

# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# ForceCommand cvs server

nice!(0)  コメント(0)  トラックバック(0) 
共通テーマ:資格・学び

nice! 0

コメント 0

コメントを書く

お名前:[必須]
URL:
コメント:
画像認証:
下の画像に表示されている文字を入力してください。

トラックバック 0

CopSSH config日用品の購入 ブログトップ

この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。