Linux 发行版:ubuntu 12.04.1 LTS
Linux 内核版本:3.2.0-31-generic-pae
配置文件:/etc/ssh/sshd_config
# Package generated configuration file
# See the sshd_config(5) manpage for details
# 1. 关于SSH Server 的整体配置,包括端口,协议,和IP访问规则
# What ports, IPs and protocols we listen for
Port 22 # SSH预设使用22号端口
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0 # 监听的主机适配卡
# 如果你有两个ip 192.168.1.100 192.168.1.101
# 写上 ListenAddress 192.168.1.100 就只接受来自
# 这个ip 的SSH联机 ,不指定的话接受所有ip
Protocol 2 # SSH支持的协议版本,如果要同时支持版本1和2,则要写成1,2的形式
# 2. 说明主机的私匙存放的位置
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key #SSH version 1 使用的私匙
HostKey /etc/ssh/ssh_host_dsa_key #SSH version 2 使用的RSA私匙
HostKey /etc/ssh/ssh_host_ecdsa_key #SSH version 3 使用的DSA私匙
# 2.1 新引入的安全机制,通过创建非特权子进程处理接入请求的方法来进行权限分离
# 防止通过有缺陷的子进程提升权限
#Privilege Separation is