﻿#!/bin/bash
# Filename: openssh-install.sh
# Auth: shuhui


ZLIB_VER=1.2.8                                           # Zlib Version
OPENSSL_VER=1.0.2e                                       # Openssl Version
OPENSSH_VER=7.1p2                                        # Openssh Version
CPU_CORE=$(grep 'processor' /proc/cpuinfo|wc -l)         # CPU Core Number

# Backup ssh binary file
[[ -d /etc/ssh ]] && mv /etc/ssh /etc/ssh.OLD

# Delete openssh package
yum -y remove openssh*


# Download Tarball Packages
curl -s -L -O https://down.vqiu.cn/package/tarball/zlib/zlib-${ZLIB_VER}.tar.gz
curl -s -L -O https://openssl.org/source/openssl-${OPENSSL_VER}.tar.gz

tar axvf zlib-${ZLIB_VER}.tar.gz
cd zlib-${ZLIB_VER}
./configure
make -j${CPU_CORE}
make install
