⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ssh-keygen.1

📁 C++编写
💻 1
字号:
.\"	$OpenBSD: ssh-keygen.1,v 1.56 2003/03/28 10:11:43 jmc Exp $.\".\"  -*- nroff -*-.\".\" Author: Tatu Ylonen <ylo@cs.hut.fi>.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland.\"                    All rights reserved.\".\" As far as I am concerned, the code I have written for this software.\" can be used freely for any purpose.  Any derived versions of this.\" software must be clearly marked as such, and if the derived work is.\" incompatible with the protocol description in the RFC file, it must be.\" called by a name other than "ssh" or "Secure Shell"..\".\".\" Copyright (c) 1999,2000 Markus Friedl.  All rights reserved..\" Copyright (c) 1999 Aaron Campbell.  All rights reserved..\" Copyright (c) 1999 Theo de Raadt.  All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\"    notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\"    notice, this list of conditions and the following disclaimer in the.\"    documentation and/or other materials provided with the distribution..\".\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED..\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE..\".Dd September 25, 1999.Dt SSH-KEYGEN 1.Os.Sh NAME.Nm ssh-keygen.Nd authentication key generation, management and conversion.Sh SYNOPSIS.Nm ssh-keygen.Bk -words.Op Fl q.Op Fl b Ar bits.Fl t Ar type.Op Fl N Ar new_passphrase.Op Fl C Ar comment.Op Fl f Ar output_keyfile.Ek.Nm ssh-keygen.Fl p.Op Fl P Ar old_passphrase.Op Fl N Ar new_passphrase.Op Fl f Ar keyfile.Nm ssh-keygen.Fl i.Op Fl f Ar input_keyfile.Nm ssh-keygen.Fl e.Op Fl f Ar input_keyfile.Nm ssh-keygen.Fl y.Op Fl f Ar input_keyfile.Nm ssh-keygen.Fl c.Op Fl P Ar passphrase.Op Fl C Ar comment.Op Fl f Ar keyfile.Nm ssh-keygen.Fl l.Op Fl f Ar input_keyfile.Nm ssh-keygen.Fl B.Op Fl f Ar input_keyfile.Nm ssh-keygen.Fl D Ar reader.Nm ssh-keygen.Fl U Ar reader.Op Fl f Ar input_keyfile.Sh DESCRIPTION.Nmgenerates, manages and converts authentication keys for.Xr ssh 1 ..Nmcan create RSA keys for use by SSH protocol version 1 and RSA or DSAkeys for use by SSH protocol version 2. The type of key to be generatedis specified with the.Fl toption..PpNormally each user wishing to use SSHwith RSA or DSA authentication runs this once to create the authenticationkey in.Pa $HOME/.ssh/identity ,.Pa $HOME/.ssh/id_dsaor.Pa $HOME/.ssh/id_rsa .Additionally, the system administrator may use this to generate host keys,as seen in.Pa /etc/rc ..PpNormally this program generates the key and asks for a file in whichto store the private key.The public key is stored in a file with the same name but.Dq .pubappended.The program also asks for a passphrase.The passphrase may be empty to indicate no passphrase(host keys must have an empty passphrase), or it may be a string ofarbitrary length.A passphrase is similar to a password, except it can be a phrase with aseries of words, punctuation, numbers, whitespace, or any string ofcharacters you want.Good passphrases are 10-30 characters long, arenot simple sentences or otherwise easily guessable (Englishprose has only 1-2 bits of entropy per character, and provides very badpassphrases), and contain a mix of upper and lowercase letters,numbers, and non-alphanumeric characters.The passphrase can be changed later by using the.Fl poption..PpThere is no way to recover a lost passphrase.If the passphrase islost or forgotten, a new key must be generated and copied to thecorresponding public key to other machines..PpFor RSA1 keys,there is also a comment field in the key file that is only forconvenience to the user to help identify the key.The comment can tell what the key is for, or whatever is useful.The comment is initialized to.Dq user@hostwhen the key is created, but can be changed using the.Fl coption..PpAfter a key is generated, instructions below detail where the keysshould be placed to be activated..PpThe options are as follows:.Bl -tag -width Ds.It Fl b Ar bitsSpecifies the number of bits in the key to create.Minimum is 512 bits.Generally, 1024 bits is considered sufficient.The default is 1024 bits..It Fl cRequests changing the comment in the private and public key files.This operation is only supported for RSA1 keys.The program will prompt for the file containing the private keys, forthe passphrase if the key has one, and for the new comment..It Fl eThis option will read a private or public OpenSSH key file andprint the key in a.Sq SECSH Public Key File Formatto stdout.This option allows exporting keys for use by several commercialSSH implementations..It Fl f Ar filenameSpecifies the filename of the key file..It Fl iThis option will read an unencrypted private (or public) key filein SSH2-compatible format and print an OpenSSH compatible private(or public) key to stdout..Nmalso reads the.Sq SECSH Public Key File Format .This option allows importing keys from several commercialSSH implementations..It Fl lShow fingerprint of specified public key file.Private RSA1 keys are also supported.For RSA and DSA keys.Nmtries to find the matching public key file and prints its fingerprint..It Fl pRequests changing the passphrase of a private key file instead ofcreating a new private key.The program will prompt for the filecontaining the private key, for the old passphrase, and twice for thenew passphrase..It Fl qSilence.Nm ssh-keygen .Used by.Pa /etc/rcwhen creating a new key..It Fl yThis option will read a privateOpenSSH format file and print an OpenSSH public key to stdout..It Fl t Ar typeSpecifies the type of the key to create.The possible values are.Dq rsa1for protocol version 1 and.Dq rsaor.Dq dsafor protocol version 2..It Fl BShow the bubblebabble digest of specified private or public key file..It Fl C Ar commentProvides the new comment..It Fl D Ar readerDownload the RSA public key stored in the smartcard in.Ar reader ..It Fl N Ar new_passphraseProvides the new passphrase..It Fl P Ar passphraseProvides the (old) passphrase..It Fl U Ar readerUpload an existing RSA private key into the smartcard in.Ar reader ..El.Sh FILES.Bl -tag -width Ds.It Pa $HOME/.ssh/identityContains the protocol version 1 RSA authentication identity of the user.This file should not be readable by anyone but the user.It is possible tospecify a passphrase when generating the key; that passphrase will beused to encrypt the private part of this file using 3DES.This file is not automatically accessed by.Nmbut it is offered as the default file for the private key..Xr ssh 1will read this file when a login attempt is made..It Pa $HOME/.ssh/identity.pubContains the protocol version 1 RSA public key for authentication.The contents of this file should be added to.Pa $HOME/.ssh/authorized_keyson all machineswhere the user wishes to log in using RSA authentication.There is no need to keep the contents of this file secret..It Pa $HOME/.ssh/id_dsaContains the protocol version 2 DSA authentication identity of the user.This file should not be readable by anyone but the user.It is possible tospecify a passphrase when generating the key; that passphrase will beused to encrypt the private part of this file using 3DES.This file is not automatically accessed by.Nmbut it is offered as the default file for the private key..Xr ssh 1will read this file when a login attempt is made..It Pa $HOME/.ssh/id_dsa.pubContains the protocol version 2 DSA public key for authentication.The contents of this file should be added to.Pa $HOME/.ssh/authorized_keyson all machineswhere the user wishes to log in using public key authentication.There is no need to keep the contents of this file secret..It Pa $HOME/.ssh/id_rsaContains the protocol version 2 RSA authentication identity of the user.This file should not be readable by anyone but the user.It is possible tospecify a passphrase when generating the key; that passphrase will beused to encrypt the private part of this file using 3DES.This file is not automatically accessed by.Nmbut it is offered as the default file for the private key..Xr ssh 1will read this file when a login attempt is made..It Pa $HOME/.ssh/id_rsa.pubContains the protocol version 2 RSA public key for authentication.The contents of this file should be added to.Pa $HOME/.ssh/authorized_keyson all machineswhere the user wishes to log in using public key authentication.There is no need to keep the contents of this file secret..El.Sh AUTHORSOpenSSH is a derivative of the original and freessh 1.2.12 release by Tatu Ylonen.Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos,Theo de Raadt and Dug Songremoved many bugs, re-added newer features andcreated OpenSSH.Markus Friedl contributed the support for SSHprotocol versions 1.5 and 2.0..Sh SEE ALSO.Xr ssh 1 ,.Xr ssh-add 1 ,.Xr ssh-agent 1 ,.Xr sshd 8.Rs.%A J. Galbraith.%A R. Thayer.%T "SECSH Public Key File Format".%N draft-ietf-secsh-publickeyfile-01.txt.%D March 2001.%O work in progress material.Re

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -