[TOC]
(注:ssh7.4升级ssh8.1p,配置文件可以不用替换,值得注意的是:ssh7.4以下版本PermitRootLogin默认yes,
ssh8.1p版本PermitRootLogin默认是prohibit-password,即禁止root用密码登录)
#### 开启telnet
`yum install xinetd telnet-server -y`
```
systemctl enable xinetd
systemctl enable telnet.socket
```
```
systemctl start telnet.socket
systemctl start xinetd
```
`netstat -lntp|grep 23`
```
vi /etc/pam.d/remote
注释第一行
#auto required pam_securetty.so
```
`telnet ip`
telnet远程登录成功
#### 编译openssh-8.1p1
1.tar zxvf openssh-8.1p1.tar.gz
2.chown -R root.root /tmp/openssh-8.1p1
3.chattr -i /etc/ssh/sshd_config
4.rm -rf /etc/ssh/*
5.cd /tmp/openssh-8.1p1
6.yum install -y openssl-devel pam-devel zlib-devel
7.(./configure --prefix=/usr/ --sysconfdir=/etc/ssh --with-zlib --with-md5-passwords --with-pam && make && make install)
8.sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/" /etc/ssh/sshd_config
9.sed -i "s/#UseDNS no/UseDNS no/" /etc/ssh/sshd_config
9.1 sed -i "s/#UsePAM no/UsePAM yes/" /etc/ssh/sshd_config
10.cp -a /tmp/openssh-8.1p1/contrib/redhat/sshd.init /etc/init.d/sshd
11.cp -a /tmp/openssh-8.1p1/contrib/redhat/sshd.pam /etc/pam.d/sshd.pam(这步不需要)
12.chmod +x /etc/init.d/sshd
13.chkconfig --add sshd
14.systemctl enable sshd
15.mv /usr/lib/systemd/system/sshd.service /root/
16.chkconfig sshd on
17./etc/init.d/sshd restart
18.netstat -lntp|grep sshd|grep 22
19.setenforce 0
20.sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
- CentOS运维手册
- CentOS6.9挂载额外的磁盘
- ACL(access control list)-权限控制
- 普通用户不能绑定80端口
- ssh8.1p1编译步骤
- 制作openssh8_1的rpm包
- 离线yum源维护
- 去除VIM中打开文件里有的^M字符
- Mysql运维手册
- CentOS6.9搭建Mariadb-Galera集群
- mysql编码报错
- haproxy代理mysql galera
- 常用sql
- MySQL通用知识点
- 修复断电损坏的MySQL数据表
- sync_binlog配置的分析
- Xtrabackup备份与恢复
- Innodb线程并发同步机制
- redo log
- 死锁分析
- 慢SQL分析
- nginx运维手册
- nginx日志分割
- proxy_set_header作用
- nginx优化
- url末尾不加/
- 负载均衡
- haproxy和nginx研究
- haproxy配置
- redis运维手册
- redis_5.0.8集群搭建
- Redis集群原理分析
- predixy的安装和配置
- redis优化
- NFS运维手册
- flock操作失败
- mongodb运维手册
- MongoDB开启用户认证
- shell编码规范
- HTTP
- HTTP的传输编码
- 性能分析
- java内存分析
- javaCPU分析