티스토리 뷰

Linux

openssh 소스 설치

CHOMAN 2015. 6. 4. 13:19

"아직 Centos 5.X 는 현역인데 openssh 가 yum 으로 업데이트가 되지 않아서 openssh 버젼을 업그레이드

하기 위해서는 소스 설치가 필요하다"


openssh 설치 파일 다운로드

wget http://www.legendry.co.kr/sh/openssh-5.6p1.tar.gz



rpm 설치된 openssh 확인

rpm -qa | grep openssh

openssh-clients-4.5p1-6.fc7

openssh-4.5p1-6.fc7

openssh-server-4.5p1-6.fc7 



rpm openssh 삭제 (가끔식 의존성 때문에 삭제 안될때도 있다. 그럴때는 굳이 삭제하지 않아도 됨)

rpm -e openssh-clients-4.5p1-6.fc7


rpm -e openssh-server-4.5p1-6.fc7

경고: /etc/ssh/sshd_config(이)가 /etc/ssh/sshd_config.rpmsave(으)로 저장되었습니다


rpm -e openssh-server-4.5p1-6.fc7

오류: openssh-server-4.5p1-6.fc7 패키지가 설치되어 있지 않습니다 


rpm -qa | grep openssh (아무것도 출력되지 않으면 삭제)



openssh 설치 (5.6 버젼을 설치)

 tar xvfz openssh-5.6p1.tar.gz


op) ./configure --prefix=/usr/local/openssh --with-tcp-wrappers --with-pam --with-md5-passwords

op) ./configure --prefix=/usr/local/openssh


make && make install



설치 스크립트 복사

cd /usr/local/src/openssh-5.6p1/contrib/redhat

cp /usr/local/src/openssh-5.6p1/contrib/sshd.pam.generic /etc/pam.d/sshd

cp sshd.init /etc/init.d/sshd



vim /etc/init.d/sshd 수정

#KEYGEN=/usr/bin/ssh-keygen

KEYGEN=/usr/local/openssh/ssh-keygen

#SSHD=/usr/sbin/sshd

SSHD=/usr/local/openssh/sbin/sshd 



심볼릭 링크 & sshd 데몬 리부팅시 실행

ln -s /usr/local/openssh/bin/* /usr/bin

ln -s /usr/local/openssh/sbin/* /usr/sbin

ln -s /usr/local/openssh/etc/ /etc/ssh

chkconfig --add sshd



ssh PATH 추가

vi /etc/profile

export PATH=/usr/loca/openssh/bin:/usr/local/openssh/sbin:$PATH 



openssh 실행

 [root@localhost]# /etc/init.d/sshd start

sshd를 시작함:WARNING: initlog is deprecated and will be removed in a future release


[root@localhost]# sshd -v

sshd: illegal option -- v

OpenSSH_5.6p1, OpenSSL 0.9.8b 04 May 2006

usage: sshd [-46DdeiqTt] [-b bits] [-C connection_spec] [-c host_cert_file]

            [-f config_file] [-g login_grace_time] [-h host_key_file]

            [-k key_gen_time] [-o option] [-p port] [-u len]




댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28
글 보관함