SSH 服务器不用密码
1 A: user a<br>ssh-keygen -t rsa |
2 Created a directory on B, if ~/.ssh exists, which is fine.<br>a@A:~> ssh b@B mkdir -p .ssh |
3 Append this to user b on B ~/.ssh/authorized_keys path.<br>a@A:~> cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys' |
4 a@A:~> ssh b@B hostname |
PS: may be you need these
- Put the public key in .ssh/authorized_keys2
- Change the permissions of .ssh to 700
- Change the permissions of .ssh/authorized_keys2 to 640
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,携手博客园推出1Panel与Halo联合会员
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步