老谢博客

  • 首页
  • WordPress
  • 网络技术
  • 乱七八糟
  • 运维技术
  • 给我留言
  • 关于老谢

Centos 6.9升级openssh到7.7p1

分类:linux日期:2018-05-23 - 13:56:49作者:老谢

开启telnet
yum install telnet-server
vi /etc/xinetd.d/telnet 
#默认telnet禁用root账户登陆,修改telnet配置文件,将配置文件中的disable         = no<修改为yes
 
vi /etc/securetty
 
#增加
#pts/0
#pts/1
#pts/2
#如果登录用户较多,需要更多的pts/*
 
/etc/init.d/xinetd start #启动xinetd进程。

yum install telnet-server vi /etc/xinetd.d/telnet #默认telnet禁用root账户登陆,修改telnet配置文件,将配置文件中的disable = no<修改为yes vi /etc/securetty #增加 #pts/0 #pts/1 #pts/2 #如果登录用户较多,需要更多的pts/* /etc/init.d/xinetd start #启动xinetd进程。

安装相关组件并升级openssh
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

关闭telnet
/etc/init.d/xinetd stop && vi /etc/xinetd.d/telnet
将之前改过的disable=yes又改回去成no.
随后再将修改iptables将23端口关闭,并重启iptables服务.
至此,可以再开ssh登录,用ssh -V查看版本号.

/etc/init.d/xinetd stop && vi /etc/xinetd.d/telnet 将之前改过的disable=yes又改回去成no. 随后再将修改iptables将23端口关闭,并重启iptables服务. 至此,可以再开ssh登录,用ssh -V查看版本号.

原文地址 : https://www.xj123.info/7111.html

本站遵循 : 署名-非商业性使用-相同方式共享 2.5 中国大陆 (CC BY-NC-SA 2.5)

版权声明 : 原创文章转载时,请务必以超链接形式标明文章原始出处

Tags: centos , linux , openssh
  • 上一篇:Zabbix 3.2.11配置zabbix_proxy实现分布式监控
  • 下一篇:ThinkPad X220 终极改造超窄边框夏普IPS高分屏
1条评论
  1. 深邃的眼瞳 说:

    不用升级openssl吗

    POST:2018-10-17 17:29 回复
发表评论 点击取消评论.

*必填

*必填

  • 文章归档
  • 子网计算
  • 我的共享
  • 锻炼计划
  • 给我留言
  • 关于老谢
2023年 9月
一 二 三 四 五 六 日
 123
45678910
11121314151617
18192021222324
252627282930  
« 4月    

最新文章

  • 装台1600元办公主机
  • 2021好久没更新博客
  • Zabbix监控oxidized备份状态
  • Zabbix 5.0 LTS版本MySQL表分区及编译安装随记
  • centos7.9部署oxidized自动备份交换机配置
  • Surface Pro 4更换屏幕与电池
  • VCSA中删除horizon view链接克隆生成的replica-受保护副本
  • Esxi6.7U3安装SanDisk Fusion-io 1.3T ioscale Pci SSD加速卡驱动
  • 搭建ELK日志系统分析处理fortigate的syslog日志
  • 华为USG防火墙配置NAT映射回流解决内网通过公网映射访问内部服务器

最新评论

  • 随遇而安:你好咱们这个站做的挺好,有没有出...
  • Andy烧麦:少说也是13代处理器,性价比很高啊
  • harries:“仔细想想自己单身一个,还是搞个公...
  • 山野愚人居:价格还可以,话说我好多年没用过...
  • adamfei:好久不见
  • kn007:好久不见,没想到离职创业!!!
  • 王光卫博客:以前也喜欢DIY现在玩不动了
  • 大D:大佬!
  • Sirit:够用就好,不过现在的电子产品是真的...
  • 美樂地:我也想买个mini PC,打算等下一代的...

日志存档

  • 2023年4月
  • 2021年10月
  • 2021年4月
  • 2021年3月
  • 2021年2月
  • 2020年11月
  • 2020年9月
  • 2020年5月
  • 2020年4月
  • 2020年3月
  • 2020年1月
  • 2019年12月
  • 2019年10月
  • 2019年7月
  • 2019年6月
  • 2019年5月
  • 2019年3月
  • 2019年1月
  • 2018年12月
  • 2018年11月
  • 2018年10月
  • 2018年7月
  • 2018年6月
  • 2018年5月
  • 2018年4月
  • 2018年3月
  • 2018年1月
  • 2017年10月
  • 2017年9月
  • 2017年8月
  • 2017年7月
  • 2017年2月
  • 2017年1月
  • 2016年12月
  • 2016年11月
  • 2016年10月
  • 2016年7月
  • 2016年6月
  • 2016年4月
  • 2016年2月
  • 2016年1月
  • 2015年12月
  • 2015年10月
  • 2015年9月
  • 2015年7月
  • 2015年5月
  • 2015年4月
  • 2015年3月
  • 2015年2月
  • 2015年1月
  • 2014年12月
  • 2014年10月
  • 2014年9月
  • 2014年8月
  • 2014年7月
  • 2014年6月
  • 2014年5月
  • 2014年4月
  • 2014年3月
  • 2014年2月
  • 2014年1月
  • 2013年12月
  • 2013年11月
  • 2013年10月
  • 2013年9月
  • 2013年8月
  • 2013年7月
  • 2013年6月
  • 2013年5月
  • 2013年4月
  • 2013年3月
  • 2013年2月
  • 2013年1月
  • 2012年12月
  • 2012年11月
  • 2012年9月
  • 2012年8月
  • 2012年7月
  • 2012年6月
  • 2012年5月
  • 2012年4月
  • 2012年3月
  • 2012年2月
  • 2012年1月
  • 2011年12月
  • 2011年11月
  • 2011年10月
  • 2011年9月
  • 2011年8月
  • 2011年7月
  • 2011年6月
  • 2011年5月
  • 2011年4月
  • 2011年3月
  • 2011年2月
  • 2011年1月
  • 2010年12月
  • 2010年11月
  • 2010年10月
  • 2010年9月
  • 2010年8月
  • 2010年7月

W3C

  • XHTML 1.0 Transitional
  • CSS level 3
  • Google+
Copyright © 2010-2023 老谢博客 All rights reserved.
Gzipped 76.5% | Optimized loading 48 queries in 0.400 seconds | Memory 37.32 MB | 皖ICP备13010663号-1
Powered by WordPress. | Hosted By 腾讯云 | Theme by WordPress主题巴士 | 站点地图 | SiteMap | Uptime | 技术支持:苏州天剑计算机系统有限公司