ssh的升級

自己公司升級使用的大致步驟

cd /usr/local/src/

tar xf openssl-1.0.2n.tar.gz

cd openssl-1.0.2n

./config --prefix=/usr --shared

make && make install

cd /usr/local/src/

tar xf openssh-7.6p1.tar.gz

cd openssh-7.6p1

cp /etc/pam.d/sshd /home/shadm1/

rpm -e --nodeps `rpm -qa | grep openssh`

./configure --prefix=/usr --sysconfdir=/etc/ssh --without-zlib-version-check --with-ssl-dir=/usr/bin/openssl --with-pam --with-zlib --mandir=/usr/share/man --with-md5-passwords

make && make install

cp contrib/redhat/sshd.init /etc/init.d/sshd

cd /etc/ssh/

chmod 600 ssh_host_ecdsa_key ssh_host_ed25519_key ssh_host_rsa_key

echo UsePAM yes >>/etc/ssh/sshd_config

echo UseLogin yes >>/etc/ssh/sshd_config

cp /home/shadm1/sshd /etc/pam.d/

service sshd restart

chkconfig sshd on

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章