linux 无交互生成ssh rsa免秘证书

Posted hufangrui

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux 无交互生成ssh rsa免秘证书相关的知识,希望对你有一定的参考价值。

[[email protected] tmp]# man ssh-keygen
NAME
ssh-keygen - authentication key generation, management and conversion

SYNOPSIS
ssh-keygen [-q] [-b bits] -t type [-N new_passphrase] [-C comment] [-f output_keyfile]
ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile]
ssh-keygen -i [-f input_keyfile]
ssh-keygen -e [-f input_keyfile]
ssh-keygen -y [-f input_keyfile]
ssh-keygen -c [-P passphrase] [-C comment] [-f keyfile]
ssh-keygen -l [-f input_keyfile]
ssh-keygen -B [-f input_keyfile]
ssh-keygen -D pkcs11
ssh-keygen -F hostname [-f known_hosts_file] [-l]
ssh-keygen -H [-f known_hosts_file]
ssh-keygen -R hostname [-f known_hosts_file]
ssh-keygen -r hostname [-f input_keyfile] [-g]
ssh-keygen -G output_file [-v] [-b bits] [-M memory] [-S start_point]
ssh-keygen -T output_file -f input_file [-v] [-a num_trials] [-W generator]
ssh-keygen [-n] [-D smartcard]
ssh-keygen -s ca_key -I certificate_identity [-h] [-Z principals] [-O option] [-V validity_interval] [-z serial_number] file ...
ssh-keygen -L [-f input_keyfile]

-t type
Specifies the type of key to create. The possible values are “rsa1” for protocol version 1 and “dsa”, “ecdsa” or “rsa” for protocol version 2.
-f filename
Specifies the filename of the key file.
-N new_passphrase
Provides the new passphrase.

[[email protected] tmp]# ssh-keygen -t rsa -N ‘‘ -f $(date ‘+%s‘).rsa
Generating public/private rsa key pair.
Your identification has been saved in 1510671746.rsa.
Your public key has been saved in 1510671746.rsa.pub.
The key fingerprint is:
19:f8:04:41:7c:18:82:ed:60:52:ff:72:ac:7d:8f:07 [email protected]
The key‘s randomart image is:
+--[ RSA 2048]----+
| ..o.o=+ |
|. +...oo. |
| o o. ..o |
| .o o o |
| . + S |
| = E |
| . . .. |
| . o. |
| ... |
+-----------------+
[[email protected] tmp]# ll
total 48K
-rw------- 1 root root 1.7K Nov 14 23:02 1510671746.rsa
-rw-r--r-- 1 root root 402 Nov 14 23:02 1510671746.rsa.pub















































以上是关于linux 无交互生成ssh rsa免秘证书的主要内容,如果未能解决你的问题,请参考以下文章

Linux 下实现SSH互信

linux系统下ssh免秘钥登录

如何在windows通过git ssh linux

https如何生成密钥

openssl 证书 及ssh密匙

Linux创建安全的SSH登录账户