liunx之秘钥登录

秘钥登录#

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

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

[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,

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值