SSH SSL

246 views
Skip to first unread message

아쿠아

unread,
Dec 21, 2012, 3:40:31 AM12/21/12
to unix-i...@googlegroups.com
1. 기존에 사용되고 있는 fileset을 삭제한다.

- openssh 및 openssl이 있다면 관련 fileset을 모두 삭제한다.
# smitty install
=> Software Maintenance and Utilities
=> Remove Installed Software

- tcp wrapper를 설치 합니다.
tcp_wrappers-7.6.1.0.exe를 설치 합니다.


2. RPM설치 및 Compile수행



- 해당 RPM을 확인 후에 설치 

(필요한 파일은 aix toolbox에서 받으시면 됩니다. 

# rpm -qa
# rpm -Uvh gcc-4.0.0-1.aix5.3.ppc.rpm
# rpm -Uvh libgcc-4.0.0-1.aix5.3.ppc.rpm
# rpm -Uvh libstdcplusplus-4.0.0-1.aix5.3.ppc.rpm      
# rpm -Uvh libstdcplusplus-devel-4.0.0-1.aix5.3.ppc.rpm
# rpm -Uvh gcc-cplusplus-4.0.0-1.aix5.3.ppc.rpm
# rpm -Uvh zlib-1.2.3-3.aix5.1.ppc.rpm
# rpm -Uvh zlib-devel-1.2.3-3.aix5.1.ppc.rpm



- 해당 유저를 추가한다.
# vi /etc/passwd
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin



- openssl 을 complile
# cd /tmp/ssh/openssl-0.9.8g
# ./config --prefix=/usr/local/openssl
# make
# make install
    
- openssh 를 compile
# cd /tmp/ssh/openssh-5.1p1
# ./configure --prefix=/usr/local/ssh \
--with-libwrap=/usr/local/lib/libwrap.a --with-ssl-dir=/usr/local/openssl

# make
# make install



- openssh을 configuration 설정
# vi /usr/local/ssh/etc/sshd_config에서 아래의 3가지 내용을 변경합니다.

AddressFamily inet
Protocol 2
PermitRootLogin no

# vi /etc/inetd.conf에서 아래의 내용을 등록한다.
ssh     stream  tcp     nowait  root    /usr/local/bin/tcpd     /usr/local/ssh/sbin/sshd -i

3. TCP Wrapper를 등록한다.

- 접속 권한에 대해 설정합니다.
   /etc/hosts.allow 파일을 생성합니다.
   구문 예제는 아래와 같습니다.
   
telnetd: 192.168.5.203 192.168.5.51 192.168.206.96
ftpd: 192.168.206.96 192.168.193.101 192.168.206.90

   /etc/hosts.deny 파일을 생성합니다. 내용은 아래와 같습니다.
   
all:all

- /etc/inetd.conf 에서 ftp와 telnet을 아래의 내용으로 변경합니다.
    
ftp     stream  tcp    nowait  root    /usr/local/bin/tcpd      /usr/sbin/ftpd
telnet  stream  tcp    nowait  root    /usr/local/bin/tcpd      /usr/sbin/telnetd -a

   inetd 데몬을 재시작 합니다.
   refresh -s inet
Reply all
Reply to author
Forward
0 new messages