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

推荐订阅源

博客园 - Franky
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Schneier on Security
Know Your Adversary
Know Your Adversary
Security Latest
Security Latest
Spread Privacy
Spread Privacy
Project Zero
Project Zero
T
The Exploit Database - CXSecurity.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
AI
AI
N
News | PayPal Newsroom
A
Arctic Wolf
NISL@THU
NISL@THU
W
WeLiveSecurity
Security Archives - TechRepublic
Security Archives - TechRepublic
Hacker News: Ask HN
Hacker News: Ask HN
P
Palo Alto Networks Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
大猫的无限游戏
大猫的无限游戏
L
Lohrmann on Cybersecurity
Last Week in AI
Last Week in AI
T
Threatpost
The Last Watchdog
The Last Watchdog
博客园_首页
C
Cybersecurity and Infrastructure Security Agency CISA
酷 壳 – CoolShell
酷 壳 – CoolShell
量子位
Engineering at Meta
Engineering at Meta
爱范儿
爱范儿
aimingoo的专栏
aimingoo的专栏
S
Security Affairs
P
Privacy & Cybersecurity Law Blog
B
Blog RSS Feed
AWS News Blog
AWS News Blog
P
Proofpoint News Feed
雷峰网
雷峰网
T
Tenable Blog
Schneier on Security
Schneier on Security
H
Heimdal Security Blog
V2EX - 技术
V2EX - 技术
V
V2EX
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Secure Thoughts
Latest news
Latest news
Help Net Security
Help Net Security
Jina AI
Jina AI
Stack Overflow Blog
Stack Overflow Blog
The Cloudflare Blog
V
Vulnerabilities – Threatpost
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org

Ssh on 轻风云

暂无文章

win11自带SSH免密登录Linux
2022-08-31 · via Ssh on 轻风云

前言

使用win11自带的SSH工具登录Linux,不需要每次都输入密码。网上找了很多教程才找到合适的,重新整理和操作并记录下来,给相同需求的小伙伴提供参考。(所有的操作都是在win11的CMD命令行)

生成公钥文件

1
ssh-keygen -t rsa -c "admin@aaayun.cc"

上传公钥文件(win11)

找到自己的公钥路径 (C:\Users\你的用户名.ssh)

1
scp C:\Users\anderyly\.ssh\id_rsa.pub root@192.168.2.222:~/.ssh

重命名公钥文件

  1. 登录linux,此时仍需要密码登陆
  1. 重命名公钥文件
1
2
cd /root/.ssh
mv id_rsa.pub authorized_keys

修改文件权限

  1. 修改文件权限
1
2
chmod 600 authorized_keys
chmod 700 /root/.ssh
  1. 修改SSH配置文件
1
vim /etc/ssh/sshd_config

保证这三句不被注释掉,如果没有则添加新的对应的语句,我需要添加"RSAAuthentication yes"

RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile .ssh/authorized_keys

1
2
3
4
5
6
7

保存退出

  3. 重新启动SSH服务(Linux)
    
```shell
systemctl restart sshd