惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Forbes - Security
Forbes - Security
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
Blog — PlanetScale
Blog — PlanetScale
WordPress大学
WordPress大学
aimingoo的专栏
aimingoo的专栏
Y
Y Combinator Blog
U
Unit 42
I
InfoQ
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
B
Blog RSS Feed
Vercel News
Vercel News
F
Fortinet All Blogs
Know Your Adversary
Know Your Adversary
T
Troy Hunt's Blog
博客园 - 【当耐特】
MongoDB | Blog
MongoDB | Blog
大猫的无限游戏
大猫的无限游戏
A
About on SuperTechFans
Jina AI
Jina AI
小众软件
小众软件
T
Threatpost
有赞技术团队
有赞技术团队
人人都是产品经理
人人都是产品经理
The Hacker News
The Hacker News
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Microsoft Azure Blog
Microsoft Azure Blog
Recent Announcements
Recent Announcements
酷 壳 – CoolShell
酷 壳 – CoolShell
Scott Helme
Scott Helme
B
Blog
腾讯CDC
Last Week in AI
Last Week in AI
P
Proofpoint News Feed
S
Schneier on Security
N
News and Events Feed by Topic
Microsoft Security Blog
Microsoft Security Blog
K
Kaspersky official blog
G
Google Developers Blog
T
Tor Project blog
PCI Perspectives
PCI Perspectives
S
Secure Thoughts
Google Online Security Blog
Google Online Security Blog
Latest news
Latest news
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
罗磊的独立博客

博客园 - NewSea

Linux 安装IntelAx211无线网卡 解决 K8sApi 部署后报 Unknown apiVersionKind apps/v1/Deployment is it registered? Docker 启动前后端脚本 docker 一键启动 mariadb 分区脚本 Spring笔记--@ConditionalOnBean坑 K8s笔记 ubuntu18+k8s单机版+kuboard+harbor安装笔记 yapi 自定义Json的数据类型 Nginx笔记 k3s+rancher+harbor 笔记 postgresql 笔记 vscode 笔记 发布Jar包到中央仓库 Java开发笔记汇总 - NewSea - 博客园 css 适配 nui-app 笔记 Java里的不能与无用. Swagger 配置
SSH 配置
NewSea · 2019-01-03 · via 博客园 - NewSea

用途

  • ssh , scp 不用密码
  • git 不用密码

方式

https://www.cnblogs.com/horanly/p/6604104.html
https://www.putty.org/

ed25519 性能更好,比 rsa 短很多。

ssh-keygen -t ed25519 -C "youremail@example.com"  -f dc-ed25519

id_rsa.pub -> gitlab ssh key

如果 pub Copy到另一台电脑, 一定要重新设置权限:

sudo chmod 600 id_rsa

sudo chmod 777 known_hosts

其它生成工具: http://www.cnblogs.com/pixy/p/4722381.html

配置多个 密钥:https://blog.csdn.net/dbb_zifeng/article/details/71698865

添加到 agent:

ssh-agent bash
ssh-add 13466496863
ssh-add iamudi

本地私钥配置文件

把私钥放到本地 .ssh 文件夹下。
配置文件很重要: 本地文件名: config 无后缀名. 在.ssh 文件下.

Host gitee2.com
    HostName gitee.com
    IdentityFile ~/.ssh/iamudi
    User iamudi@163.com

Host gitee.com
    HostName gitee.com
    Port 22
    IdentityFile ~/.ssh/13466396863
    User 13466396863@163.com

公钥服务器位置

/root/.ssh/authorized_keys

如果有多个客户端, 在 文件中追加.pub 公钥 即可.

cat /root/.ssh/id_rsa.pub >> authorized_keys

使用

这样在使用的时候:

git clone git@gitee2.com:iamudi/inv.git
ssh root@lzh

可以使用别名了.