当前位置:网站首页>公钥\私人 ssh避password登陆
公钥\私人 ssh避password登陆
2022-07-06 17:57:00 【全栈程序员站长】
大家好,又见面了,我是全栈君
相关概念以前见过,决不要注意,使用公共密钥管理之前,腾讯云主机的备案机,非常头发的感觉,查了一下相关资料,这里总结下:
字符a:192.168.7.188 (ubuntu)
字符b:192.168.7.17 (centos)
希望从a登陆b的时候,不须要输入password.我原先的想法是将b的公钥放到a的key文件里,这样让a使用公钥跟b的私钥 进行匹配.结果却恰恰相反,
实际的操作是将a的公钥放到b的key文件中面.
在a上生成密钥,命令
ssh-keygen -t rsa (这里的加密类型类型也公钥选择dsa)
默认会在~/.ssh文件夹以下生存一对密钥
我们将id_rsa.pub中的内容拷贝到b机器的authorized_keys中去就ok了,假设该文件不存在则又一次建一个
以下说下怎样使用公钥和密钥管理server使用者的权限,比方一台server有非常多开发人员使用,在遇到有员工离职的时候,我们都须要更改password什么的,这样对大家来说都听麻烦,有了密钥,我们在平时的时候要求大家都使用自己的公钥来登陆server,在员工离职的时候,管理员仅仅须要删除离职员工的公钥就公钥了.
若出现Agent admitted failure to sign using the key. 运行:ssh-add ~/.ssh/id_rsa
版权声明:本文博主原创文章,博客,未经同意不得转载。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/116905.html原文链接:https://javaforall.cn
边栏推荐
- Go zero micro service practical series (IX. ultimate optimization of seckill performance)
- 剑指 Offer II 035. 最小时间差-快速排序加数据转换
- [100 cases of JVM tuning practice] 05 - Method area tuning practice (Part 2)
- 云呐|工单管理软件,工单管理软件APP
- Dynamic planning idea "from getting started to giving up"
- Transformation transformation operator
- What does security capability mean? What are the protection capabilities of different levels of ISO?
- Js逆向——捅了【马蜂窝】的ob混淆与加速乐
- The difference between spin and sleep
- The MySQL database in Alibaba cloud was attacked, and finally the data was found
猜你喜欢
[hfctf2020]babyupload session parsing engine
身体质量指数程序,入门写死的小程序项目
从底层结构开始学习FPGA----FIFO IP的定制与测试
Wood extraction in Halcon
力扣1037. 有效的回旋镖
Start from the bottom structure to learn the customization and testing of fpga---- FIFO IP
405 method not allowed appears when the third party jumps to the website
Make Jar, Not War
Body mass index program, entry to write dead applet project
[Niuke] b-complete square
随机推荐
Byte P7 professional level explanation: common tools and test methods for interface testing, Freeman
MySQL中回表的代价
阿里云中mysql数据库被攻击了,最终数据找回来了
云呐|工单管理办法,如何开展工单管理
C language instance_ three
第三方跳转网站 出现 405 Method Not Allowed
身体质量指数程序,入门写死的小程序项目
THREE. AxesHelper is not a constructor
2022 Google CTF SEGFAULT LABYRINTH wp
Metauniverse urban legend 02: metaphor of the number one player
Neon Optimization: an optimization case of log10 function
Google released a security update to fix 0 days that have been used in chrome
分享一个通用的so动态库的编译方法
Taro applet enables wxml code compression
Dark horse notes - exception handling
C language instance_ four
Asset security issues or constraints on the development of the encryption industry, risk control + compliance has become the key to breaking the platform
C语言实例_5
Transformation transformation operator
ARM裸板调试之JTAG调试体验