当前位置:网站首页>ECS settings SSH key login
ECS settings SSH key login
2022-07-04 22:57:00 【Song Xiaoyu】
- The client generates public and private keys
ssh-keygen -t rsa -b 4096 -C "[email protected]"
- Upload public key to server
scp ~/.ssh/id_rsa.pub [email protected] Server address :/root
- Log in to the server
- establish .ssh file
mkdir /root/.ssh
- create a file
cd /root/.ssh touch authorized_keys
- Add the private key
cat id_rsa.pub >> /root/.ssh/authorized_keys
- Add permissions
chmod -R 700 .ssh
# ssh The configuration file is located in
vim /etc/ssh/sshd_config
# restart ssh
systemctl restart sshd.service
Reference documents
https://developer.aliyun.com/article/641091
Pay attention to chown Is to change the owner ,chmod Is to change permissions
边栏推荐
- Tla+ introductory tutorial (1): introduction to formal methods
- 【OpenGL】笔记二十九、抗锯齿(MSAA)
- [machine learning] handwritten digit recognition
- Insert sort, select sort, bubble sort
- Redis démarrer le tutoriel complet: Pipeline
- Redis入门完整教程:有序集合详解
- Redis getting started complete tutorial: publish and subscribe
- 串口数据帧
- Redis getting started complete tutorial: Geo
- Redis introduction complete tutorial: client communication protocol
猜你喜欢
攻防世界 MISC 进阶区 Ditf
Redis入门完整教程:哈希说明
The overview and definition of clusters can be seen at a glance
新版判断PC和手机端代码,手机端跳转手机端,PC跳转PC端最新有效代码
EditPlus--用法--快捷键/配置/背景色/字体大小
Mongodb aggregation operation summary
Unity-VScode-Emmylua配置报错解决
Breakpoint debugging under vs2019 c release
Attack and defense world misc advanced grace-50
安装人大金仓数据库
随机推荐
环境加密技术解析
Attack and defense world misc advanced area Hong
Unity Xiuxian mobile game | Lua dynamic sliding function (specific implementation of three source codes)
NFT Insider #64:电商巨头eBay提交NFT相关商标申请,毕马威将在Web3和元宇宙中投入3000万美元
Redis入门完整教程:列表讲解
Taobao commodity review API interface (item_review get Taobao commodity review API interface), tmall commodity review API interface
How can enterprises cross the digital divide? In cloud native 2.0
Redis入门完整教程:慢查询分析
共创软硬件协同生态:Graphcore IPU与百度飞桨的“联合提交”亮相MLPerf
图片懒加载的原理
PMO: compare the sample efficiency of 25 molecular optimization methods
Record: how to scroll screenshots of web pages on Microsoft edge in win10 system?
Redis入门完整教程:HyperLogLog
It is said that software testing is very simple, but why are there so many dissuasions?
Redis getting started complete tutorial: publish and subscribe
攻防世界 MISC 进阶区 hit-the-core
Insert sort, select sort, bubble sort
蓝队攻防演练中的三段作战
9 - 类
About stack area, heap area, global area, text constant area and program code area