2017-03-26-centos7.5升级openssh


layout: post
title: “centos7.5升级openssh”
categories: [实施工程]
tags: [centos openssh]

需要可以连互联网


wget http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.4p1.tar.gz

yum -y install xinetd
yum -y install telnet
yum -y install telnet-server

vi /etc/xinetd.d/telnet    修改 disable = yes 为 disable = no
如果不存在,就新建一个
# default: yes    
# description: The telnet server servestelnet sessions; it uses \   
# unencrypted username/password pairs for authentication.  
service telnet         
{    
	flags = REUSE    
	socket_type = stream    
	wait = no    
	user = root    
	server =/usr/sbin/in.telnetd    
	log_on_failure += USERID    
	disable = no   
}

systemctl restart xinetd.service
ps -ef | grep xinetd
ps -ef | grep telnet
systemctl stop firewalld

用telnet方式登录
gpowerx
Gpower@2019
su -

tar zxvf openssh-8.3p1.tar.gz
cd openssh-8.3p1


rpm -qa | grep pam

rpm -qa|grep zlib

rpm -qa |grep openssl


yum -y install gcc gcc++ && yum -y install pam-devel && yum -y install zlib-devel-1.2.7 && yum -y install openssl-devel


./configure --prefix=/usr --sysconfdir=/etc/ssh --with-md5-passwords --with-pam --with-zlib --with-openssl-includes=/usr --with-privsep-path=/var/lib/sshd 

for i in $(rpm -qa |grep openssh);do rpm -e $i --nodeps;done

rm -rf /etc/ssh

make && make install

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

chkconfig --add sshd

chkconfig sshd on

chkconfig --list|grep sshd

sed -i "32a PermitRootLogin no" /etc/ssh/sshd_config






ssh -V

setenforce 0

vi /etc/selinux/config
SELINUX=disabled


systemctl restart sshd


使用ssh登录,成功后关闭telent相关

systemctl stop xinetd.service
ps -ef | grep xinetd
ps -ef | grep telnet
systemctl start firewalld
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

黑朱雀

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值