[Cygwin] Open SSH 설치하고 sshd 서비스로 등록하기

Cygwin 에 OpenSSH를 설치하고 sshd를 윈도우 서비스로 등록해서 사용하고 있다.
요즘, 리눅스를 지워버린 상태기 때문에 Cygwin을 사용해서 이런 저런 일 하는 경우가 많다.

참조 문서 : http://pigtail.net/LRP/printsrv/cygwin-sshd.html

1. 일단, Cygwin의 setup.exe 에서 openssh를 선택해서 설치한다.

2. 내컴퓨터->속성->고급->환경변수->시스템 변수에서 CYGWIN=ntsec을 설정한다. "ntsec"은 Cygwin이 Windows의 보안 규칙을 사용해서 파일 등의 접근 권한을 설정함을 의미한다.(참조 : http://pigtail.net/LRP/printsrv/ntsec.html)

3. 윈도우의 각 사용자에게 비밀번호를 지정한다.

4. Cygwin 셸을 실행하고서 ssh-host-config명령을 실행한다. 그리고 모든 질문에 yes 로 대답한다. 마지막에 CYGWIN 옵션을 물을 때는 "ntsec"을 지정한다.
kwon37xi@kwonnam ~
$ ssh-host-config
Generating /etc/ssh_host_key
Generating /etc/ssh_host_rsa_key
Generating /etc/ssh_host_dsa_key
Generating /etc/ssh_config file
Privilege separation is set to yes by default since OpenSSH 3.3.
However, this requires a non-privileged account called 'sshd'.
For more info on privilege separation read /usr/share/doc/openssh/README.privsep.

Should privilege separation be used? (yes/no) yes
Warning: The following function requires administrator privileges!
Should this script create a local user 'sshd' on this machine? (yes/no) yes
Generating /etc/sshd_config file
Added ssh to C:WINDOWSsystem32driversetcservices


Warning: The following functions require administrator privileges!

Do you want to install sshd as service?
(Say "no" if it's already installed as service) (yes/no) yes

Which value should the environment variable CYGWIN have when
sshd starts? It's recommended to set at least "ntsec" to be
able to change user context without password.
Default is "ntsec". CYGWIN=ntsec

The service has been installed under LocalSystem account.
To start the service, call `net start sshd' or `cygrunsrv -S sshd'.

Host configuration finished. Have fun!

5. 제어판의 서비스에서 Cygwin sshd를 끄고 켤 수 있으며, Cygwin 셸에서는 cygrunsrv -S sshd 명령이나, 윈도우 명령창에서 net start sshd으로 마찬가지로 sshd를 켤 수 있다.

6. Putty 등으로 Cygwin sshd 가 실행중인 컴퓨터에 접속할 수 있다.

7. 외부에서 접속이 안될 때는 윈도우의 방화벽을 확인하고, 22포트를 열어준다.

8. 윈도우에 여러명의 사용자가 있을 경우, Cygwin과 동기화를 하려면 Cygwin 셸에서
# 사용자 동기화하기
$ mkpasswd --local > /etc/passwd
$ mkgroup --local > /etc/group


tags: cygwin sshd openssh windows service 서비스 윈도우

by 권남 | 2006/06/16 15:05 | 리눅스/Unix 이야기 | 트랙백(1) | 핑백(1) | 덧글(0)

트랙백 주소 : http://kwon37xi.egloos.com/tb/2496478
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]
Tracked from 일상에서 행복 찾기 at 2006/11/15 21:23

제목 : [Cygwin] Open SSH 설치하고 sshd ..
[Cygwin] Open SSH 설치하고 sshd 서비스로 등록하기 유용한 정보네요 ^^...more

Linked at Gallery-하나둘셋넷..... at 2008/06/09 18:07

... 하셈.http://rommance.net/wikix/index.php?display=Cygwin#wikiXheading_95. cygwin 추가 구축 문서http://kwon37xi.egloos.com/24964786. 추가3http://www.hompydesign.com/bbs/board.php?bo_table=basic_news&wr_id=213&a ... more

:         :

:

비공개 덧글

◀ 이전 페이지          다음 페이지 ▶