sshd中国語取扱説明書
11625 ワード
sshd中国語取扱説明書
名前sshd-OpenSSH SSHデーモン
構文sshd[-46 Ddeiqt][-b bits][-f config_file][-g login_grace_time][-h host_key_file][-k key_gen_time][-o option][-p port][-u len]
説明sshdはOpenSSH SSHデーモンプロセスです.信頼できないネットワーク上で安全な接続チャネルを提供するために使用されます.
資格認定
ログインプロセス
SSHRC
AUTHORIZED_KEYSファイルフォーマット
SSH_KNOWN_HOSTSファイル形式
ファイル
名前sshd-OpenSSH SSHデーモン
構文sshd[-46 Ddeiqt][-b bits][-f config_file][-g login_grace_time][-h host_key_file][-k key_gen_time][-o option][-p port][-u len]
説明sshdはOpenSSH SSHデーモンプロセスです.信頼できないネットワーク上で安全な接続チャネルを提供するために使用されます.
sshd root , , 。
、 、 、 、 。
sshd ( sshd_config(5)) , 。
sshd SIGHUP , ( )。
:
-4 sshd IPv4
-6 sshd IPv6
-b bits
SSH-1 , 768
-D sshd , 。 。
-d 。 ,
, 。 。
-d ( 3 )。
-e stderr 。
-f config_file
, /etc/ssh/sshd_config 。
sshd 。
-g login_grace_time
, 120 。
, 。
。
-h host_key_file
。
root , root 。
SSH-1 , :/etc/ssh/ssh_host_key
SSH-2 , :/etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_dsa_key
-i sshd inetd 。
sshd , inetd 。
, 。
, , 512 , inetd 。
-k key_gen_time
SSH-1 , 3600 。 。
SSH-1 。
。
-o option
(" ") 。
。
sshd_config(5) 。
-p port
( 22), 。
, Port 。
ListenAddress 。
-q 。 。 、 、 。
-t 。 。 。
-u len utmp , , ip 。
。 "-u0" ip 。
"-u0" sshd DNS , DNS 。
RhostsRSAAuthentication, HostbasedAuthentication DNS ,
from="pattern-list" DNS ,
AllowUsers DenyUsers USER@HOST DNS 。
資格認定
OpenSSH SSH-1 SSH-2 , Protocol 。
SSH-2 RSA DSA , SSH-1 RSA 。
, ( 2048 ) 。
SSH-1, ( 768 , ), 。
, , , 。
256 , , 。
256 ( ) 。
, 3DES 。
SSH-2, Diffie-Hellman 。 ,
( AES-256)。
, (hmac-md5, hmac-sha1, umac-64, hmac-ripemd160) 。
, ( 、 、 - 、 ) 。
, 、X11 、TCP 、 。
, shell , , 。
shell 。
, , 。
ログインプロセス
,sshd :
1. tty , , /etc/motd 。
/etc/motd ~/.hushlogin , " " 。
2. tty , 。
3. /etc/nologin , root, /etc/nologin 。
4.
5.
6. , ~/.ssh/environment
sshd_config(5) PermitUserEnvironment 。
7.
8. ~/.ssh/rc , /etc/ssh/sshrc ( )。
xauth 。 "SSHRC" 。
9. shell 。
SSHRC
~/.ssh/rc , 、 shell , sh 。
stdout , stderr 。
X11 , "proto cookie" ( DISPLAY )。
xauth , sshd xauth X11 cookies
, AFS 。
:
if read proto cookie && [ -n "$DISPLAY" ]; then
if [ `echo $DISPLAY | cut -c1-10` = 'localhost:' ]; then
# X11UseLocalhost=yes
echo add unix:`echo $DISPLAY |
cut -c11-` $proto $cookie
else
# X11UseLocalhost=no
echo add $DISPLAY $proto $cookie
fi | xauth -q -
fi
, /etc/ssh/sshrc ;
/etc/ssh/sshrc , xauth cookie
AUTHORIZED_KEYSファイルフォーマット
AuthorizedKeysFile ( ~/.ssh/authorized_keys) , 。
'#' 。
SSH-1 : , ,exponent( ),modulus( ), 。
SSH-2 : , ,base64 , 。
" " , (" " )。
" " "ssh-dss" "ssh-rsa" 。
DSA 8192, RSA 16384 。sshd RSA 768 。
, identity.pub, id_dsa.pub id_rsa.pub 。
" " , ( )。
:
command="command"
( ), 。
, 。
pty, pty , 。
8-bit clean( ) , pty 。
。 。
, TCP / X11 , 。
SSH_ORIGINAL_COMMAND 。
shell/ / 。
environment="NAME=value"
, NAME value 。 。
。
, PermitUserEnvironment 。
UseLogin , 。
from="pattern-list"
, "pattern-list" 。pattern-list 。
。
ssh_config(5) " " 。
no-agent-forwarding
, 。
no-port-forwarding
, TCP 。 。
command , 。
no-pty ( )。
no-X11-forwarding
, X11 ( X11 )。
permitopen="host:port"
"ssh -L" , 。
IPv6 "host/port" 。
permitopen 。
, ip 。
tunnel="n"
tun(4) 。
, , 。
authorized_keys :
#
ssh-rsa AAAAB3Nza...LiPk== [email protected]
from="* .sales.example.net,!pc.sales.example.net" ssh-rsa AAAAB2...19Q== [email protected]
command="dump /home",no-pty,no-port-forwarding ssh-dss AAAAC3...51R== example.net
permitopen="192.0.2.1:80",permitopen="192.0.2.2:25" ssh-dss AAAAB5...21S==
tunnel="0",command="sh /etc/netstart tun0" ssh-rsa AAAAE6...6DR== [email protected]
SSH_KNOWN_HOSTSファイル形式
/etc/ssh/ssh_known_hosts ~/.ssh/known_hosts , 。
, :
, ~/.ssh/known_hosts 。
, SSH-1 SSH-2 。
SSH-1: , ,exponent,modulus,
SSH-2: , ,base64 , 。
。 '#' 。
" " ('*' '?' )。
, ;
, 。
'!' : , 。
'[' ']' , ':' 。
" " , , 。
'|' 。
, (*,?) (!)。
" ,exponent,modulus" " ,base64 " RSA ,
/etc/ssh/ssh_host_key.pub 。
" " , 。
, 。
, ( 、 )。
, 。
, /etc/ssh/ssh_host_key.pub , 。
ssh_known_hosts :
#
closenet,...,192.0.2.53 1024 37 159...93 closenet.example.net
cvs.example.net,192.0.2.10 ssh-rsa AAAA1234.....=
#
|1|JfKTdBh7rNbXkVAQCRp4OQoPfmI=|USECr3SWf1JUPsms5AqfD5QfxkM= ssh-rsa AAAA1234.....=
ファイル
~/.hushlogin
PrintLastLog PrintMotd ,
, /etc/motd 。
Banner 。
~/.rhosts
( ssh(1) ), / 。
, NFS 。
, 。
"600"。
~/.shosts
.rhosts , rlogin/rsh 。
~/.ssh/authorized_keys
RSA/DSA 。 。
, "600"。
、 (~/.ssh)、 , ,
。
,sshd , StrictModes no 。
:chmod go-w ~/ ~/.ssh ~/.ssh/authorized_keys
~/.ssh/environment
( ) 。 :
'#' , "name=value" 。
"600"。
, PermitUserEnvironment 。
~/.ssh/known_hosts
/etc/ssh/ssh_known_hosts 、 。
。 "600"。
~/.ssh/rc
、 shell , 。
"600"。
/etc/hosts.allow
/etc/hosts.deny
tcp-wrappers , 。 hosts_access(5) 。
/etc/hosts.equiv
( ssh(1))。 root 。
/etc/ssh/moduli
"Diffie-Hellman Group Exchange" Diffie-Hellman groups 。
moduli(5) 。
/etc/motd
"motd" "message of the day"( )。 。
、 shell , login 。
.hushlogin 。
/etc/nologin
,sshd root , 。
。
/etc/shosts.equiv
hosts.equiv , rsh/rlogin 。
/etc/ssh/ssh_host_key
/etc/ssh/ssh_host_dsa_key
/etc/ssh/ssh_host_rsa_key
, root, "600"。
,sshd 。
/etc/ssh/ssh_host_key.pub
/etc/ssh/ssh_host_dsa_key.pub
/etc/ssh/ssh_host_rsa_key.pub
, root, "644"。
。
, 。
, ~/.ssh/authorized_keys /etc/ssh/ssh_known_hosts 。
ssh-keygen(1) 。
/etc/ssh/ssh_known_hosts
。 。
。 root, "644"。
/etc/ssh/sshd_config
sshd 。 sshd_config(5) 。
/etc/ssh/sshrc
~/.ssh/rc , 。 root, "644"。
/var/empty
sshd , 。
, root, "000"。
/var/run/sshd.pid
sshd 。
, 。
, 。