-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
📝 ssh intro and login #9
Conversation
Wow, I love you, my cuty sweety femboy 😘 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM! cc @Orion-zhen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
||
一些常用可选项: | ||
- `[-t rsa | dsa | ecdsa | ecdsa-sk | ed25519 | ed25519-sk | rsa]`:指定加密算法,不同加密算法复杂性和安全性也不同 | ||
- `[-b bits]`指定密钥长度,有些加密算法,如rsa,密钥长度是可以变化的 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
对 RSA 算法, 常见的长度是 2048, 3072, 4096. 一般推荐 3072 长度, 是安全性和性能的最佳平衡. 4096 长度的密钥能提供最高的安全性, 但是加解密的时间会显著增加. 不过在现代计算机上, 椭圆加密的 ed25519 是更好的选择, 因为它兼顾了安全性和性能.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感谢 @Orion-zhen 我会把这部分内容加入进去 🌹
src/dev/ssh.md
Outdated
然后我们需要将公钥复制到服务器上,这可以使用以下命令: | ||
|
||
```bash | ||
ssh_copy_id [-i /your/path/to/ssh/keypair.pub user@host] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在 Windows 平台上并没有这个命令, 所以需要手动将公钥复制到服务器的 ~/.ssh/authorized_keys
文件中. 一个非常 tricky 的点在于, Linux 系统对 ~/.ssh
目录的权限和 ~/.ssh/authorized_keys
的权限是有要求的. 要求 ~/.ssh
目录的权限为 600 或 700, ~/.ssh/authorized_keys
的权限为 600. 否则配置不起效.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我原本打算附上实操的例子,不过我今天才回到学校,估计明天会去工位拿主机实操一下,到时候可能会修改部分遗留的错误。
另外,我手边没有macOS和windows环境,不太清楚ssh在这两个系统上的流程(感觉mac应该大差不差,windows会很不一样?),有关这两个系统的内容可能需要 @root-hbx @Orion-zhen 帮忙 😊 💗 |
亲测,MacOS和目前文档里给到的过程完全一致😍 文档写的非常非常详细!感谢 @Scorpicathe 相信会很有助于今年选课同学对SSH的了解与实操 :)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good. I believe it is ready to go :))
Working on #6
Roadmap:
I’m not very familiar with SSH, feel free to point out any mistakes 😭