SSH的加密配置

客户端192.168.200.129

服务器192.168.200.128

 

1服务器

首先在服务器关闭防火墙

临时

>iptables -L  //查看防火墙

>iptables -F //临时关闭防火墙

>iptables -L  //查看防火墙

永久关闭

>getenforce
> chkconfig --list iptables
> chkconfig iptables off
> chkconfig --list iptables
> vi /etc/selinux/config

修改为

SELINUX=disabled


> reboot
> iptables -L
> getenforce

 

2客户端

>ssh-keygen -t rsa -b 2048
> ssh-copy-id root@192.168.200.128
>ssh 192.168.200.128

 >exit 退出

 

3服务端关闭SSh

> vim /etc/ssh/sshd_config
搜索一下三条,将选项改为No
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM no
>systemctl restart sshd   重启sshd服务
posted @ 2021-03-31 12:35  Linux_运维  阅读(516)  评论(0)    收藏  举报