service iptables stop yum -y install gcc gcc-c++ telnet-server* pam-devel zlib-devel openssl openssl-devel vim -b /etc/xinetd.d/telnet
mv /etc/securetty /etc/securetty.old service xinetd start
service sshd stop mv /etc/ssh /etc/ssh.old cd /home/ishangsoft wget http://down.i.my71.com/openssh-7.9p1.tar.gz tar -zxvf openssh-7.9p1.tar.gz cd openssh-7.9p1 ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-zlib --with-md5-passwords --with-tcp-wrappers make -j4 make install echo 'KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1' >> /etc/ssh/sshd_config echo 'Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc' >> /etc/ssh/sshd_config sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin\ yes/g' /etc/ssh/sshd_config sed -i 's/#PermitEmptyPasswords\(.*\)/PermitEmptyPasswords\ no/g' /etc/ssh/sshd_config \cp -f contrib/redhat/sshd.init /etc/init.d/sshd service sshd start
mv /etc/securetty.old /etc/securetty service xinetd stop service iptables start ssh -V
参考:https://blog.csdn.net/qq_25934401/article/details/83419849
没有帐号? 立即注册