SSH 与 WebDAV - 各自的安全漏洞是什么?
我有一个个人 Git 存储库,出于各种原因(主要是骄傲,因为它大部分是半页潦草的行),我不想公开它,所以我将它托管在个人服务器上。
我对任何人对以下实现之间的安全性的想法感兴趣(如果重要的话,主机是 CentOS 5.6):
- 使用基于密钥的身份验证的 SSH,密钥使用 20 个字符的密码短语;
- WebDAV 使用 Apache 2.2,密码使用 20 个字符的密码。
关于 SO 有很多关于哪个更好、更方便等的讨论,但它们似乎主要是功能性的。哪个更容易/更不那么容易破解或利用?正如我所说,存储库中的信息并不敏感,只是不良爱好代码的集合。除了可口可乐和百事可乐“你觉得哪个味道更好?”之外,我只是想找到一些东西来作为我的决定的基础。主观辩论。
感谢任何评论。
I have a personal Git repository which I don't want to have publicly available for a variety of reasons (chiefly pride, as it's mostly half-pages of scribbled lines), so I'm hosting it on a personal server.
I am interested in anyone's thoughts on security between the following implementations (the host is CentOS 5.6 if that matters):
- SSH using key-based authentication with keys using 20-character passphrases;
- WebDAV using Apache 2.2 and passwords using 20-character passwords.
There are a number of discussions on SO about which is better, more convienent, etc but they seem to be chiefly functional. Which would be more/less straightforward to break or tap into? As I said, the information in the repo is not sensitive, just a collection of bad hobby code. I'm just trying to find something to base my decision besides a Coke-vs-Pepsi "which tastes better to you?" subjective debate.
Appreciate any comments.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
具体问题,但一般答案。
因此,HTTPS 和 SSH 在这方面几乎相同,但使用私钥文件更好。使用 SSH 可能更容易设置,但使用 HTTPS 则更困难。
因此,在您的具体问题中(假设您也选择 HTTPS 而不是 HTTP),SSH 会更安全,因为私钥文件几乎不可能被破解。基于密码的身份验证存在常见的安全问题(字典、暴力破解、rainbowtable 等)。
实际上,它将 20 字节密码与 1024/2048/4096 位公钥进行比较。
Specific question, but general answer.
So HTTPS and SSH are pretty much equal in this regard, but using private key files is better. This might be easier to setup using SSH, but harder for HTTPS.
So in your specific question (assuming also you're going for HTTPS and not HTTP) SSH will be more secure, because private key files are virtually impossible to crack. Password-based authentication has the usual security issues (dictionary, bruteforce, rainbowtable, etc).
Effectively it's comparing the 20-byte password to a 1024/2048/4096 bit public key.