系统管理指南:安全性服务

Solaris 安全 Shell 中的关键字

下表列出了关键字及其缺省值(如果存在)。这些关键字按字母顺序排列。客户机上的关键字位于 ssh_config 文件中。应用于服务器的关键字位于 sshd_config 文件中。一些关键字在两个文件中均有设置。如果关键字仅应用于一种协议版本,则列出了该版本。

表 19–1 Solaris 安全 Shell 配置文件中的关键字(A 到 Escape)

关键字 

缺省值 

位置 

协议 

AllowGroups

无缺省值。 

服务器 

 

AllowTcpForwarding

no

服务器 

 

AllowUsers

无缺省值。 

服务器 

 

AuthorizedKeysFile

~/.ssh/authorized_keys

服务器 

 

Banner

/etc/issue

服务器 

 

Batchmode

no

客户机 

 

BindAddress

无缺省值。 

客户机 

 

CheckHostIP

yes

客户机 

 

Cipher

blowfish, 3des

客户机 

v1 

Ciphers

aes128-ctr, aes128-cbc, 3des-cbc, blowfish-cbc, arcfour

两者 

v2 

ClearAllForwardings

无缺省值。 

客户机 

 

ClientAliveInterval

0

服务器 

v2 

ClientAliveCountMax

3

服务器 

v2 

Compression

yes

两者 

 

CompressionLevel

无缺省值。 

客户机 

 

ConnectionAttempts

1

客户机 

 

DenyGroups

无缺省值。 

服务器 

 

DenyUsers

无缺省值。 

服务器 

 

DynamicForward

无缺省值。 

客户机 

 

EscapeChar

~

客户机 

 

表 19–2 Solaris 安全 Shell 配置文件中的关键字(Fall 到 Local)

关键字 

缺省值 

位置 

协议 

FallBackToRsh

no

客户机 

 

ForwardAgent

no

客户机 

 

ForwardX11

no

客户机 

 

GatewayPorts

no

两者 

 

GlobalKnownHostsFile

/etc/ssh/ssh_known_hosts

客户机 

 

GSSAPIAuthentication

yes

两者 

v2 

GSSAPIDelegateCredentials

no

客户机 

v2 

GSSAPIKeyExchange

yes

两者 

v2 

GSSAPIStoreDelegateCredentials

no

客户机 

v2 

Host

*有关更多信息,请参见 Solaris 安全 Shell 中的主机特定参数

客户机 

 

HostbasedAuthentication

no

两者 

v2 

HostbasedUsesNamesFromPacketOnly

no

服务器 

v2 

HostKey

/etc/ssh/ssh_host_key

服务器 

v1 

HostKey

/etc/ssh/host_rsa_key, /etc/ssh/host_dsa_key

服务器 

v2 

HostKeyAlgorithms

ssh-rsa, ssh-dss

客户机 

v2 

HostKeyAlias

无缺省值。 

客户机 

v2 

IdentityFile

~/.ssh/identity

客户机 

v1 

IdentityFile

~/.ssh/id_dsa, ~/.ssh/id_rsa

客户机 

v2 

IgnoreRhosts

yes

服务器 

 

IgnoreUserKnownHosts

yes

服务器 

 

KbdInteractiveAuthentication

yes

两者 

 

KeepAlive

yes

两者 

 

KeyRegenerationInterval

3600(秒)

服务器 

 

ListenAddress

无缺省值。 

服务器 

 

LocalForward

无缺省值。 

客户机 

 

表 19–3 Solaris 安全 Shell 配置文件中的关键字(Login 到 R)

关键字 

缺省值 

位置 

协议 

LoginGraceTime

600(秒)

服务器 

 

LogLevel

info

两者 

 

LookupClientHostname

yes

服务器 

 

MACs

hmac-sha1,hmac-md5

两者 

v2 

MaxAuthTries

6

服务器 

 

MaxAuthTriesLog

无缺省值。 

服务器 

 

MaxStartups

10:30:60

服务器 

 

NoHostAuthenticationForLocalHost

no

客户机 

 

NumberOfPasswordPrompts

3

客户机 

 

PAMAuthenticationViaKBDInt

yes

服务器 

v2 

PasswordAuthentication

yes

两者 

 

PermitEmptyPasswords

no

服务器 

 

PermitRootLogin

no

服务器 

 

PermitUserEnvironment

no

服务器 

 

PreferredAuthentications

gssapi-keyex, gssapi-with-mic, hostbased, publickey, keyboard-interactive, password

客户机 

v2 

Port

22

两者 

 

PrintMotd

no

服务器 

 

Protocol

2

两者 

 

ProxyCommand

无缺省值。 

客户机 

 

PubkeyAuthentication

yes

两者 

v2 

RemoteForward

无缺省值。 

客户机 

 

RhostsAuthentication

no

两者 

v1 

RhostsRSAAuthentication

no

两者 

v1 

RSAAuthentication

no

两者 

v1 

表 19–4 Solaris 安全 Shell 配置文件中的关键字(S 到 X)

关键字 

缺省值 

位置 

协议 

ServerKeyBits

768

服务器 

 

StrictHostKeyChecking

ask

客户机 

 

StrictModes

yes

服务器 

 

Subsystem

sftp /usr/lib/ssh/sftp-server

服务器 

 

SyslogFacility

auth

服务器 

 

UseLogin

no,已过时并被忽略。

服务器 

 

User

无缺省值。 

客户机 

 

UserKnownHostsFile

~/.ssh/known_hosts

客户机 

 

VerifyReverseMapping

no

服务器 

 

X11Forwarding

yes

服务器 

 

X11DisplayOffset

10

服务器 

 

X11UseLocalHost

yes

服务器 

 

XAuthLocation

无缺省值。 

两者 

 

Solaris 安全 Shell 中的主机特定参数

如果不同的本地主机具有不同 Solaris 安全 Shell 特征很有用,则管理员可以在 /etc/ssh/ssh_config 文件中定义单独的参数组,以根据主机或正则表达式进行应用。通过按 Host 关键字对文件中的项进行分组,可完成此任务。如果不使用 Host 关键字,则客户机配置文件中的项将应用于任一用户正在使用的本地主机。

Solaris 安全 Shell 和登录环境变量

如果 sshd_config 文件中未设置以下 Solaris 安全 Shell 关键字,则这些关键字将从 /etc/default/login 文件的等效项中获取各自的值:

/etc/default/login 中的项

sshd_config 中的关键字和值

CONSOLE=*

PermitRootLogin=without-password

#CONSOLE=*

PermitRootLogin=yes

PASSREQ=YES

PermitEmptyPasswords=no

PASSREQ=NO

PermitEmptyPasswords=yes

#PASSREQ

PermitEmptyPasswords=no

TIMEOUT=secs

LoginGraceTime=secs

#TIMEOUT

LoginGraceTime=300

RETRIESSYSLOG_FAILED_LOGINS

仅应用于 passwordkeyboard-interactive 验证方法。

通过 login 命令设置以下变量后,sshd 守护进程将使用这些值。未设置这些变量时,守护进程将使用缺省值。

TIMEZONE

控制 TZ 环境变量的设置。如果未设置此值,在启动 sshd 守护进程时,守护进程将使用 TZ 的值。

ALTSHELL

控制 SHELL 环境变量的设置。缺省值是 ALTSHELL=YES,此时 sshd 守护进程使用用户 shell 的值。ALTSHELL=NO 时,不设置 SHELL 值。

PATH

控制 PATH 环境变量的设置。未设置此值时,缺省路径为 /usr/bin

SUPATH

控制 rootPATH 环境变量的设置。未设置此值时,缺省路径为 /usr/sbin:/usr/bin

有关更多信息,请参见 login(1)sshd(1M) 手册页。