sh 生成SSH密钥

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 生成SSH密钥相关的知识,希望对你有一定的参考价值。

# generate the key
ssh-keygen -t rsa

# Generating public/private rsa key pair.
# Enter file in which to save the key (/demo/.ssh/id_rsa): 
# Enter passphrase (empty for no passphrase): 
# Enter same passphrase again: 
# Your identification has been saved in /demo/.ssh/id_rsa.
# Your public key has been saved in /demo/.ssh/id_rsa.pub.
# The key fingerprint is:
# 4a:dd:0a:c6:35:4e:3f:ed:27:38:8c:74:44:4d:93:67 demo@a
# The key's randomart image is:
# +--[ RSA 2048]----+
# |          .oo.   |
# |         .  o.E  |
# |        + .  o   |
# |     . = = .     |
# |      = S = .    |
# |     o + = +     |
# |      . o + o .  |
# |           . o   |
# |                 |
# +-----------------+

# show the key
cat ~/.ssh/id_rsa.pub

# connect
ssh root@[your.ip.address.here]

# more info: https://www.digitalocean.com/community/tutorials/how-to-use-ssh-keys-with-digitalocean-droplets

以上是关于sh 生成SSH密钥的主要内容,如果未能解决你的问题,请参考以下文章

sh 生成密钥对X509和SSH

sh [生成新的SSH密钥对] #generate #key #ssh #pair #passwordless #login #authentication

sh 轻松的ssh密钥生成器,以保持简单的键入最佳实践

为“apache”用户生成 SSH 密钥

sh [复制ssh密钥]将ssh密钥复制到服务器#shell #terminal

sh 添加RSA密钥远程SSH服务授权密钥