centos 证书登录

原文地址:https://blog.csdn.net/long690276759/article/details/53535464

原文地址:https://blog.csdn.net/xcbeyond/article/details/38855069

原文地址:http://coolnull.com/3486.html


一、用SecureCRT 生成秘钥:







1、秘钥生成以后,将公钥上传到服务器目录下(比如:/root/.ssh/);

2、在 .ssh目录下新建:authorized_keys2, 命令:touch /root/.ssh/authorized_keys2

3、追加公钥到authorized_keys2中:cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys2 (将id_rsa.pub的内容追加到 authorized_keys2 中)

4、设置文件的权限:

chown -R 0700 ~/.ssh

0644 ~/.ssh/authorized_keys2

5、修改ssh的配置文件

vi /etc/ssh/sshd_config

找到 RSAAuthentication、StrictModes、PubkeyAuthentication、AuthorizedKeysFile 并修改

RSAAuthentication yes

StrictModes no

PubkeyAuthentication AuthorizedKeysFile .ssh/authorized_keys


6、重启ssh服务:systemctl restartsshd.service


二、 ssh生成秘钥对:

# ssh-keygen -t rsa (连续三次回车,即在本地生成了公钥和私钥,不设置密码)

.ssh/目录下生成了2个文件:id_rsa为私钥,id_rsa.pub为公钥 (如果是root账户,那么目录在 /root/.ssh/)



三、SecureCRT 用证书登录


版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Centos下搭建性能监控Spotlight
CentOS 6.3下Strongswan搭建IPSec VPN
在CentOS6.5上安装Skype与QQ
阿里云基于centos6.5主机VPN配置
CentOS 6.3下配置multipah
CentOS安装、配置APR和tomcat-native
centos6.5下postgres-XC集群安装与配置
CentOS 6使用openssl搭建根CA
CentOS6.6中安装VNC server
CentOS下更新Python最新版本
Centos安装pycurl
CentOS 7 安装PostGIS
CentOS 7.1PXE网络自动化安装
CentOS下ffmpeg与第三方编码编译安装
CentOS 6.4安装配置squid
CentOS6.5 安装配置drbd
CentOS6.4 安装jenkins
centos安装增强工具
CentOS6.4安装配置redis
CentOS 6上部署OpenVPN Server