如何设置SSH公钥身份验证

Being familiar with SSH and the command-line is essential to good web development. This article is geared towards people who already have a basic understanding of the command line and using Secure Shell (SSH), but would like to improve and streamline remotely connecting to servers. Things that we'll cover are:

熟悉SSH和命令行对于良好的Web开发至关重要。 本文适用于已经对命令行有基本了解并使用安全外壳(SSH),但是希望改进和简化远程连接服务器的人员。 我们将介绍的内容包括:

1 Understanding public and private key cryptography
2 Security implications for SSH public-key authentication vs. password authentication.
3 Generating SSH keys
4 Setting it all up
5 Different methods for copying your public key to remote servers
6 Creating SSH shortcuts
1个 了解公钥和私钥加密
2 SSH公钥身份验证与密码身份验证的安全隐患。
3 生成SSH密钥
4 全部设置
5 将公钥复制到远程服务器的不同方法
6 创建SSH快捷方式

什么是公钥密码术? (What is Public Key Cryptography?)

Heads Up: This is a gross oversimplification of how it works. It's enough to get you going, but you should still read up on it and understand it in detail. 注意:这是对其工作方式的过度简化。 它足以使您前进,但是您仍然应该阅读并详细了解它。

SSH is short for Secure Shell. The most commonly used SSH server on Linux is called OpenSSH. Luckily, unless you're truly building a server from scratch, OpenSSH is probably bundled on your local machine and remote server. If it's not, a simple Google Search should help you get started on that front.

SSH是Secure Shell的缩写。 Linux上最常用的SSH服务器称为OpenSSH 。 幸运的是,除非您是从头开始真正构建服务器,否则OpenSSH可能会捆绑在本地计算机和远程服务器上。 如果不是这样,一个简单的Google搜索应该可以帮助您入门。

Open SSH is awesome because it allows for Public and Private Key Pairing. Public and Private Key Pairing can be used for all sorts of stuff. Some common examples include, plain-old encryption, server authentication, and Git authentication.

Open SSH非常棒,因为它允许公钥和私钥配对。 公钥和私钥配对可用于各种东西。 一些常见的示例包括普通加密,服务器身份验证和Git身份验证。

Key Pairs work by having two keys: a Public and a Private Key. The Private Key is not meant to be shared anywhere but the computer it is on (if it be the private key of your local laptop or the private key of a remote server). The Public Key, however, is intended to be put on any other computer/server you would like to pair the private key with. You can put the public key on as many different computers or servers as you would like. Here's an example to help explain:

密钥对通过具有两个密钥来工作:公钥和私钥。 私钥不是要在任何地方共享,而是要在其所在的计算机上共享(如果它是本地笔记本电脑的私钥或远程服务器的私钥)。 但是, 公钥应放置在要与私钥配对的任何其他计算机/服务器上。 您可以将公用密钥放置在任意多台不同的计算机或服务器上。 这是一个示例以帮助说明:

Public and Private Key Pairing By looking at the above chart you'll notice a few things. "
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值