ssh 无密码登录_无密码SSH登录的工作方式

本文翻译自《如何实现SSH无密码登录》一文,深入解析SSH无密码登录的实现机制,帮助用户在Linux环境中更安全便捷地进行远程操作。
摘要由CSDN通过智能技术生成

ssh 无密码登录

SSH (Secure Shell) is a protocol that is used for remote administration of Linux systems. Obviously, it is secure, but what if I told you that you can make it even more secure by disabling the password?

SSH (安全外壳)是用于Linux系统的远程管理的协议。 显然,它是安全的,但是如果我告诉您可以通过禁用密码使其更加安全呢?

没有密码? (Passwordless?)

Yes, you heard it right: passwordless. Using it, you are able to just run:

是的,您没听错:无密码。 使用它,您可以运行:

user@client:$ ssh user@server
// connectinguser@server:$

Sure, it is convenient. But it is not just about convenience and security: One task that absolutely needs it is automation. If you want your scripts (deployment, maintenance, etc.) to perform any SSH-related tasks, you will need this enabled.

当然,这很方便。 但这不仅涉及便利性和安全性:绝对需要的一项任务是自动化。 如果您希望脚本(部署,维护等)执行任何与SSH相关的任务,则需要启用此功能。

But you might be wondering how it can ever be secure. Surely nothing can protect you more than a long password? In theory, yes. In practice, it’s really easy to leak the password, forget it, use it elsewhere, or use a common one that can easily be hacked.

但是您可能想知道它如何安全。 当然,除了长密码,没有什么可以保护您的? 从理论上讲,是的。 实际上,泄漏密码,忘记密码,在其他地方使用密码或使用容易被黑客入侵的通用密码确实很容易。

Passwordless, on the other hand, is immune to all kinds of attacks, as long as your own system is not compromised or your attackers don’t have a quantum computer. Fair to say, nothing is going to be secure when we get quantum computers, so let’s just ignore that for now.

另一方面,只要您的系统没有受到威胁或攻击者没有量子计算机,无密码就可以抵抗各种攻击。 可以说,当我们获得量子计算机时,没有什么是安全的,所以让我们暂时忽略它。

它是如何工作的? (How Does It Work?)

Firstly, you have to understand what public/private keys are. A private key is a very long, random stream of bits (2,048 is used most often). A private key is kept secret and never leaves the client (your PC). A public key is another

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值