# Written by k-square 2002-September-8 # # Port 22 ListenAddress 192.168.1.1 Protocol 2 HostKey /etc/ssh_host_key HostKey /etc/ssh_host_rsa_key HostKey /etc/ssh_host_dsa_key ServerKeyBits 768 LoginGraceTime 60 KeyRegenerationInterval 1800 StrictModes yes PermitRootLogin without-password PrintMotd yes Banner /etc/ssh2.motd #CheckMail no UseLogin no PrintLastLog yes KeepAlive yes UsePrivilegeSeparation yes # # # 以下の2行でSSH2接続の際に、5分間の無通信時の切断を設定 ClientAliveInterval 60 ClientAliveCountMax 5 # # # 認証に成功していない接続数の制限 MaxStartups 3:75:6 # # # DNSで逆引き&正引きで相手の正しさを確認する #ReverseMappingCheck yes # # # クライアント側の.rhostsを無視する設定(絶対yes) IgnoreRhosts yes # # # SSH1のRSA認証 RSAAuthentication yes # SSH1のrhosts認証(絶対no) RhostsAuthentication no RhostsRSAAuthentication no # # # SSH2のRSA&DSA認証(これはyes) PubkeyAuthentication yes # SSH2でホストベースの認証(絶対no) HostbasedAuthentication no # # # SSH1&SSH2でのパスワード認証(絶対no) PasswordAuthentication no PermitEmptyPasswords no # SSH1&SSH2でのS/key認証 ChallengeResponseAuthentication no # SSH1&SSH2でのPAM(チャレンジレスポンス認証) PAMAuthenticationViaKbdInt no # # # Kerberos認証系(Kerberos自体を許可してない) #KerberosAuthentication no #KerberosOrLocalPasswd no #AFSTokenPassing no #KerberosTicketCleanup yes #KerberosTgtPassing no # # # ポートフォワーディング関係 AllowTcpForwarding yes GatewayPorts no # # # X11関係(全部止める) X11Forwarding no #X11DisplayOffset 10 # # # シスログの出力 SyslogFacility AUTH LogLevel INFO #obsoletes QuietMode and FascistLogging # # # オプション #Subsystem sftp /usr/libexec/sftp-server