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

推荐订阅源

Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
SecWiki News
SecWiki News
Forbes - Security
Forbes - Security
N
News | PayPal Newsroom
S
Security @ Cisco Blogs
Schneier on Security
Schneier on Security
V
V2EX - 技术
S
Secure Thoughts
W
WeLiveSecurity
Google DeepMind News
Google DeepMind News
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
S
Securelist
S
Security Archives - TechRepublic
Know Your Adversary
Know Your Adversary
V
Vulnerabilities – Threatpost
Security Latest
Security Latest
Recent Commits to openclaw:main
Recent Commits to openclaw:main
G
GRAHAM CLULEY
H
Hacker News: Front Page
Microsoft Azure Blog
Microsoft Azure Blog
I
Intezer
Google Online Security Blog
Google Online Security Blog
美团技术团队
阮一峰的网络日志
阮一峰的网络日志
T
The Exploit Database - CXSecurity.com
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Webroot Blog
Webroot Blog
Jina AI
Jina AI
Engineering at Meta
Engineering at Meta
P
Proofpoint News Feed
The Cloudflare Blog
I
InfoQ
L
LangChain Blog
U
Unit 42
P
Proofpoint News Feed
S
Schneier on Security
S
Security Affairs
Y
Y Combinator Blog
T
Tenable Blog
N
News and Events Feed by Topic
MyScale Blog
MyScale Blog
量子位
Google DeepMind News
Google DeepMind News
Cyberwarzone
Cyberwarzone
博客园 - 聂微东
D
Darknet – Hacking Tools, Hacker News & Cyber Security
GbyAI
GbyAI
AWS News Blog
AWS News Blog

Windows on 轻风云

Windows Server 2022 KMS 激活序列号 Navicat Premium for Win v16.0.14 完美激活 HEU KMS Activator v23.1.0 win10 office2019激活工具 windows下golang编译报running gcc failed错误 windows下Navicat15破解详细教程带注册机 Windows10安装GCC和Make工具 Linux下通过rdesktop远程windows WPS Office 2016 专业版/专业增强版/绿色精简版本 Win10数字激活神器HWIDGen v9.32 汉化版
win11自带SSH免密登录Linux
2022-08-31 · via Windows 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