1.备份
mv /etc/ssh/ /etc/ssh_back
2.
wget https://openbsd.hk/pub/OpenBSD/OpenSSH/portable/openssh-7.5p1.tar.gz
tar -zxvf openssh-7.5p1.tar.gz
3.
yum install -y zlib-devel gcc openssl-devel
./configure --prefix=/usr --sysconfdir=/etc/ssh
make
rpm -e --nodeps `rpm -qa | grep openssh
make install
cp contrib/redhat/sshd.init /etc/init.d/sshd
chkconfig --add sshd
vim /etc/ssh/sshd_config
PermitRootLogin yes
vim /etc/selinux/config
加上 SELINUX=disabled
setenforce 0
关闭selinux不用重启机器
service sshd restart
mv /etc/ssh/ /etc/ssh_back
2.
wget https://openbsd.hk/pub/OpenBSD/OpenSSH/portable/openssh-7.5p1.tar.gz
tar -zxvf openssh-7.5p1.tar.gz
3.
yum install -y zlib-devel gcc openssl-devel
./configure --prefix=/usr --sysconfdir=/etc/ssh
make
rpm -e --nodeps `rpm -qa | grep openssh
make install
cp contrib/redhat/sshd.init /etc/init.d/sshd
chkconfig --add sshd
vim /etc/ssh/sshd_config
PermitRootLogin yes
vim /etc/selinux/config
加上 SELINUX=disabled
setenforce 0
关闭selinux不用重启机器
service sshd restart