로그인
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 179
232 우분투 rpm 파일을 deb로 변경시 i386 제비게릴라 2020-08-18 108
231 ubuntu nvidia 드라이버 업데이트 제비게릴라 2020-05-07 11
230 우분투 관련 명령 및 정보 제비게릴라 2020-03-13 19
229 centos 7에서 nic 고정 방법 제비게릴라 2020-03-05 107
228 pci 슬롯 확인... lspci 제비게릴라 2020-02-06 466
227 ubuntu apt proxy 설정 제비게릴라 2020-01-31 34
226 apache 동작이 안 될 때 제비게릴라 2019-12-17 1607
225 MBR 삭제시 복구 방법 제비게릴라 2019-10-01 68
224 tx hang 관련 (TSO) 제비게릴라 2019-08-05 870
223 centos 7에서 파워버튼 눌러도 안 꺼지게 하는 방법 제비게릴라 2019-07-30 69
222 date 사용한 스크립트 제비게릴라 2019-07-16 16
221 자주 사용하는 명령어 제비게릴라 2019-06-27 179
220 리눅스 상에서 MBR 삭제 및 복구 방법 제비게릴라 2019-06-19 144
219 expect에서 echo 명령어로 추가할 때 [1] 제비게릴라 2019-06-04 307
218 chage 명령으로 패스워드 날짜 업데이트.. 제비게릴라 2019-05-14 60
217 하드웨어 시간 맞추는 방법 제비게릴라 2019-04-22 43
216 dell disk 교체 방법 제비게릴라 2019-04-22 116
215 hpssacli, hpacucli 사용 디스크 교체 방법 [1] 제비게릴라 2019-04-22 405
214 ping이 제대로 안 나갈때 connect: No buffer space available [1] 제비게릴라 2019-01-04 436
» centos 7.5에서 openssh 소스 설치 [1] 제비게릴라 2018-10-24 233