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

推荐订阅源

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
罗磊的独立博客

博客园 - builderman

运行abp install-libs的时候,提示"NPM is not installed"的原因及解决办法 nginx 基本操作 nginx 正向代理与反正代理的区别及简单配置 KeyCloak基础概念 用crontab定时分隔nginx日志文件 修改linux终端中当前用户的显示颜色 minikube使用笔记 ssh端口转发 kubectl proxy 让外部网络访问K8S service的ClusterIP 记录一下我在ubuntu下安装 minikube的过程 docker vscode server docker network docker mysql8 phpmyadmin linux 压缩与解压缩 Ubuntu添加开机自动启动程序的方法 Linux基本命令集合 linux下使用supervisor启动.net core mvc website的配置 小修改,让mvc的验证锦上添点花(2) 小修改,让mvc的验证锦上添点花(1)
ssh ssh-keygen 私钥
builderman · 2020-09-10 · via 博客园 - builderman

ssh-keygen用来生成公钥id-rsa.pub与私钥文件id-rsa

可以通过-f参数指定生成的名字,以下命令将生成abc-rsa与abc-rsa.pub这两个文件

客户端在生成这两个文件后,可以用ssh-copy-id命令,把公钥文件追加到server端的authorized_keys文件后面

以下命令会把abc_rsa.pub文件的内容追加到server.com服务器root用户家目录下的~/.ssh/authorized_keys文件后面,

然后客户端就可以通过私钥来完成登录而不需要输出密码了

ssh  -i ~/.ssh/abc_rsa.pub root@server.com

ssh client 默认会去找id_rsa文件

我们也可以手动指定私钥文件,如:

ssh root@server.com -i ~/.ssh/abc_rsa

另外,我们还可以在ssh的配置文件中指定

~./.ssh/config文件内容如下

Host server
    HostName server.com
    User root
    IdentityFile ~/.ssh/abc_rsa

然后直接使用ssh远程到服务器

这个很方便,连用户名,主机名跟私钥文件都放在了配置文件里面