SSH 使用密钥对认证
Posted crossworld
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SSH 使用密钥对认证相关的知识,希望对你有一定的参考价值。
#ssh-keygen#ssh-copy-id -i ~/.ssh/id_rsa.pub sysadm01@192.168.1.2
1 [risen@oc5800450712 ~]$ ssh-keygen 2 Generating public/private rsa key pair. 3 Enter file in which to save the key (/home/risen/.ssh/id_rsa): 4 Enter passphrase (empty for no passphrase): 5 Enter same passphrase again: 6 Your identification has been saved in /home/risen/.ssh/id_rsa. 7 Your public key has been saved in /home/risen/.ssh/id_rsa.pub. 8 The key fingerprint is:10 The key‘s randomart image is: 11 +---[RSA 2048]----+ 12 | ..+.+.oo=.| 13 | =.=oo++.o| 14 | ..+.o=Eo++| 15 | . .oo +o *| 16 | . S o o..=.| 17 | o o = *o.o| 18 | . = = o. | 19 | . o . | 20 | .. | 21 +----[SHA256]-----+ 22 [risen@oc5800450712 ~]$
1 [risen@oc5800450712 ~]$ ssh-copy-id -i ~/.ssh/id_rsa.pub sysadm01@192.168.1.2
1 ssh sysadm01@192.168.1.2
以上是关于SSH 使用密钥对认证的主要内容,如果未能解决你的问题,请参考以下文章
Windows平台使用Navicat for MySQL通过SSH密钥认证连接远程MySQL数据库