随笔分类 - ssh
摘要:目的:为了巩固线上外网服务器的安全,避免黑客攻击植入木马,初步决定禁用root密码登录(安全强度低),统一使用秘钥登录(4096位长度,安全性较高) 具体操作如下: 一、生成ssh秘钥: ssh-keygen -t rsa -b 4096 cat /root/.ssh/id_rsa.pub >> /
阅读全文
摘要:生成钥匙: [root@localhost .ssh]# ssh-keygen -t rsa # 无-C指定,默认为root,生成位置都是/root/.ssh目录中 [root@localhost .ssh]# cat id_rsa.pub ssh-rsa AAAAB3NzaC1yc2EAAAADA
阅读全文
摘要:防攻击可以增加IP白名单/etc/hosts.allow和黑名单/etc/hosts.deny /etc/hosts.allow IP白名单 /etc/hosts.deny IP黑名单 /etc/hosts.allow配置,此文件是接受服务列表,文件内容如下: # # hosts.allow Thi
阅读全文
摘要:ssh_exchange_identification: read: Connection reset by peer报错如下: [root@izbp17x1~]# ssh admin@139.196.。。 -p 2048 -vOpenSSH_7.4p1, OpenSSL 1.0.2k-fips 2
阅读全文

浙公网安备 33010602011771号