로그인
Sign in

wget http://dsc-svc-08/openssh-6.4p1.tar.gz
yum install zlib-devel
yum install openssl-devel
tar xvf openssh-6.4p1.tar.gz
cd openssh-6.4p1/
./configure --prefix=/usr/local/openssh6.4p1
yum erase openssh
ssh -V
make
make install

ln -s /usr/local/openssh6.4p1/bin/ssh /usr/bin/ssh
vi /etc/init.d/sshd
systemctl enable sshd
chmod 755 /etc/init.d/sshd
ssh -V

제비게릴라

2018.10.25
09:24:11
(*.170.33.77)

cat /etc/init.d/sshd

#!/bin/sh

# chkconfig: 345 99 19

# description: sshd daemon

 

cnt=`ps -ef|grep '/usr/local/openssh6.4p1/sbin/sshd'|grep -v grep |wc -l`

 

case "$1" in

  start)

        if [ ${cnt} -ne 0 ]

        then

        echo "sshd daemon is aleady"

        else

        /usr/local/openssh6.4p1/sbin/sshd

        echo "sshd daemon is start"

        fi

        ;;

  stop)

        if [ ${cnt} -ne 0 ]

        then

        ps -ef|grep '/usr/local/openssh6.4p1/sbin/sshd'|grep -v grep|awk '{print $2}'|xargs kill

        echo "sshd is down"

        else

        echo "sshd is aleady down"

        fi

        ;;

  status)

        if [ ${cnt} -ne 0 ]; then

        echo "sshd is running"

        else

        echo "sshd is down"

        fi

        ;;

  restart)

        $0 stop

        sleep 5

        $0 start

        ;;

  *)

        echo "Usage: $0 {start|stop|status|restart}"

        exit 1

esac

 

exit $?

List of Articles
번호 제목 글쓴이 날짜 조회 수
공지 자주 사용하는 명령어 제비게릴라 2019-06-27 20927
» centos 7.5에서 openssh 소스 설치 [1] 제비게릴라 2018-10-24 5383
212 apache2 2.4.33 소스 설치 제비게릴라 2018-10-15 5331
211 oom-killer 시에 종료 순서 정하기.. 제비게릴라 2018-05-11 5288
210 centos 7의 kernel.sem 설정 방법 제비게릴라 2018-05-02 5296
209 ubuntu 멀티 인터페이스 설정 작업 제비게릴라 2018-02-27 5226
208 yum update 시 중단 되었을때 조치 법 제비게릴라 2017-01-15 6535
207 파일 사이즈 비교 제비게릴라 2016-04-29 5211
206 rpm 패키징 방법 file 제비게릴라 2016-04-29 6619
205 heartbeat 설정 방법 제비게릴라 2015-10-19 6567
204 oracle 계정으로 ssh 접속시 Key 인증 방식의 로그인 오류 발생 조치 제비게릴라 2015-10-06 5255
203 리눅스 date 명령 : 어제(과거) , 내일(미래) 날짜, 시간 구하기 제비게릴라 2015-03-20 5251
202 redhat 커널 버전 리스트 제비게릴라 2015-02-10 6304
201 문자열 추출 쉘 스크립트... 제비게릴라 2014-09-25 5216
200 Partition 1 does not start on physical sector boundary. 메세지 삭제... 제비게릴라 2014-08-28 5767
199 vi 치환 명령 제비게릴라 2014-03-12 5527
198 프로세스 별 Disk I/O 확인 방법 (block_dump) [1] 제비게릴라 2013-07-16 6458
197 logger 옵션... 제비게릴라 2013-05-27 5426
196 vsftpd 시간 맞추기... 제비게릴라 2013-05-27 5463
195 Linux Kernel Tuning 제비게릴라 2013-03-21 6463
194 자동으로 멀티패스 잡았을시 블랙리스트 추가하기.. 제비게릴라 2012-12-06 6895