liunx之秘钥登录

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_29590071/article/details/86661845

秘钥登录#

一般的密码方式登录,容易有密码被暴力破解的问题 ##描述秘钥和锁头的发送

###秘钥命令 ###
生成锁头和秘钥

[root@m01-61 ~]# ssh-keygen -t dsa #生成锁头和秘钥之后一顿enter键
Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa): 
/root/.ssh/id_dsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
The key fingerprint is:
SHA256:MEqFs9okmrR2rAWQjhcO5qRCsbl55t88CHprizhghtc root@m01-61
The key's randomart image is:
+---[DSA 1024]----+
| o.  ..          |
|+++ o.           |
|X= ..oo          |
|+=*.o. o         |
|+*+O.   S        |
|==*=E            |
|=.=.. .          |
|oo.o..o.         |
|.oooo. o.        |
+----[SHA256]-----+
  1. 判断物理连接是否能通
[root@m01-61 .ssh]# ping 172.16.1.41
PING 172.16.1.41 (172.16.1.41) 56(84) bytes of data.
64 bytes from 172.16.1.41: icmp_seq=1 ttl=64 time=4.59 ms
64 bytes from 172.16.1.41: icmp_seq=2 ttl=64 time=0.336 ms
64 bytes from 172.16.1.41: icmp_seq=3 ttl=64 time=0.210 ms
^[[A64 bytes from 172.16.1.41: icmp_seq=4 ttl=64 time=0.176 ms

安装centos7系统


选择自动以即可
这里选取你的镜像即可安装软件
开机安装
添加内核参数 让网卡名称变为eth0…


系统优化

解决更换网卡出现问题
解决办法参照老男孩大哥:http://blog.51cto.com/oldboy/1722101
系统的之防火墙

  1. 查看防火墙是否开启

  2. 关闭防火墙&关闭自启动

  3. 查看防火墙

重启服务reboot

优化sshd服务
解决shhd登录缓慢问题
3. 禁用DNS,

猜你喜欢

转载自blog.csdn.net/qq_29590071/article/details/86661845
今日推荐