yum install -y gcc openssl-devel pam-devel rpm-build pam-devel
wget http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.7p1.tar.gz
rpm -e `rpm -qa | grep openssh` --nodeps
tar -zxvf openssh-7.7p1.tar.gz
cd openssh-7.7p1
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-zlib --with-md5-passwords --with-tcp-wrappers
make && make install
vi /etc/ssh/sshd_config
#sed -i '/^#PermitRootLogin/s/#PermitRootLogin yes/PermitRootLogin yes/' /etc/ssh/sshd_config
#或手动修改PermitRootLogin no 修改为 PermitRootLogin yes 允许root远程登陆
service sshd restart
#重启openssh
ssh -V
#查看版本
cp contrib/redhat/sshd.init /etc/init.d/sshd
chkconfig --add sshd
chkconfig sshd on
service sshd start
service sshd restart
chkconfig --list sshd
yum install -y gcc openssl-devel pam-devel rpm-build pam-devel
wget http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.7p1.tar.gz
rpm -e `rpm -qa | grep openssh` --nodeps
tar -zxvf openssh-7.7p1.tar.gz
cd openssh-7.7p1
./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-zlib --with-md5-passwords --with-tcp-wrappers
make && make install
vi /etc/ssh/sshd_config
#sed -i '/^#PermitRootLogin/s/#PermitRootLogin yes/PermitRootLogin yes/' /etc/ssh/sshd_config
#或手动修改PermitRootLogin no 修改为 PermitRootLogin yes 允许root远程登陆
service sshd restart
#重启openssh
ssh -V
#查看版本
cp contrib/redhat/sshd.init /etc/init.d/sshd
chkconfig --add sshd
chkconfig sshd on
service sshd start
service sshd restart
chkconfig --list sshd