SSH
ssh-keyscan - gather ssh public keys from servers
/etc/ssh/ssh_config => HostKey 有系统内置的key
options
-c Request certificates from target hosts instead of plain keys
-D Print keys found as SSHFP DNS records. The default is to print keys in a format usable as a ssh known_hosts file
-H Hash all hostnames and addresses in the output. Hashed names may be used normally by ssh and sshd
-t type Specify the type of the key to fetch from the scanned hosts. The possible values are `dsa` `ecdsa` `ed25519` `rsa`. Multiple values may be specified by separating them with commas. The default is to fetch `rsa` `ecdsa` `ed25519`
ssh-keygen
-R Remove all public keys belonging to the specified hostname (with optional port number) from known_hosts (default ~/.ssh/known_hosts), this option is useful to delete hashed hosts
-H Hash a known_hosts file. This replaces all hostnames and addresses with hashed representation within the specified file
-l Show fingerprint of specified public key file. For RSA and DSA keys ssh-keygen tries to find the matching key file and prints its fingerprint. If combined with -v, a visual ASCII art representation of the key is supplied with the fingerprint
-E fingerprint_hash Specifies the hash algorithm used when displaying key fingerprints. Valid options are: `md5` AND `sha256`. The default is `sha256`
-r hostname Print the SSFP fingerprint resource record named hostname for the specified public key file, -f 不指定, 寻找/etc/ssh/ssh_host_*_key, hostname 随便
-e This option will read a private or public OpenSSH key file and print to stdout a public key in one of the formats specified by the -m option. The default export format is `RFC4716`. This option allows exporting OpenSSH keys for use by other programs, including several commercial SSH implementations
-m key_format Specify a key format for key generation, the -i (import) -e (export) conversion options, and the -p change passphrase operation. The latter may be used to convert between OpenSSH private key and PEM private key formats
-y This option will read a private OpenSSH format file and print an OpenSSH public key to stdout
-p Requests changing the passphrase of a private key file instead of creating a new private key
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
2022-04-04 Java: mysql-connector-java
2021-04-04 httpd2.4安装
2021-04-04 VMware相关的缩略语和缩略语