ps -ef | grep sshd로 하니 아래와 같이 4개의 ssh 데몬이 검색되었다.
| root 2050 1 0 Mar24 ? 00:00:00 /usr/sbin/sshd root 25402 2050 0 10:23 ? 00:00:00 sshd: morpheuz [priv] morpheuz 25404 25402 0 10:23 ? 00:00:00 sshd: morpheuz@pts/1 root 26343 2050 0 16:53 ? 00:00:00 sshd: morpheuz [priv] morpheuz 26345 26343 0 16:53 ? 00:00:00 sshd: morpheuz@pts/4 morpheuz 26394 25405 0 17:00 pts/1 00:00:00 grep --color=auto sshd |
priv는 previleged의 약자로, 보안을 강화하기 위해
접속은 소켓을 열수 있는 root로 열고
root의 sshd가 chile process를 만들어, 권한을 제한하여 서비스를 해준다.
위의 ps -ef 에서 보이듯,
| [root] /usr/sbin/sshd [root] + sshd : morpheuz [priv] [user] + sshd : morpheuz@pts/1 [root] + sshd : morpheuz [priv] [user] + sshd : morpheuz@pts/4 |
| LOGIN PROCESS When a user successfully logs in, sshd does the following: 1. If the login is on a tty, and no command has been specified, prints last login time and /etc/motd (unless prevented in the configuration file or by ~/.hushlogin; see the FILES section). 2. If the login is on a tty, records login time. 3. Checks /etc/nologin; if it exists, prints contents and quits (unless root). 4. Changes to run with normal user privileges. 5. Sets up basic environment. 6. Reads the file ~/.ssh/environment, if it exists, and users are allowed to change their environment. See the PermitUserEnvironment option in sshd_config(5). 7. Changes to user’s home directory. 8. If ~/.ssh/rc exists, runs it; else if /etc/ssh/sshrc exists, runs it; other- wise runs xauth. The “rc” files are given the X11 authentication protocol and cookie in standard input. 9. Runs user’s shell or command. [링크 : http://linux.die.net/man/8/sshd] |
[링크 : http://www.citi.umich.edu/u/provos/ssh/privsep.html]
[링크 : http://www.citi.umich.edu/u/provos/ssh/privsep-faq.html]
'Linux' 카테고리의 다른 글
| ls 용량별로 정렬하기 (0) | 2010.04.01 |
|---|---|
| 파일포인터 / 파일디스크립터 상호 변환하기 및 상태변경하기 : fd <-> fp transform (8) | 2010.03.31 |
| fdisk를 자동화하기? (non interative mode fdisk) (0) | 2010.03.25 |
| mkfs에는 quick format 없나요? (0) | 2010.03.19 |
| grep으로 원하는 문자열 색상 바꾸기? (2) | 2010.03.17 |
