Каково значение-i в ssh?

Что делает -i тег добавляет к команде, такой как:

ssh -i path-to-pem-file ubuntu@ip-address
-1
задан 28 August 2016 в 03:31

2 ответа

Из страницы справочника:

-i identity_file
             Selects a file from which the identity (private key) for public
             key authentication is read.  The default is ~/.ssh/identity for
             protocol version 1, and ~/.ssh/id_dsa, ~/.ssh/id_ecdsa,
             ~/.ssh/id_ed25519 and ~/.ssh/id_rsa for protocol version 2.
             Identity files may also be specified on a per-host basis in the 
             configuration file.  It is possible to have multiple -i options
             (and multiple identities specified in configuration files).  
             If no certificates have been explicitly specified by the
             CertificateFile directive, ssh will also try to load certificate 
             information from the filename obtained by appending -cert.pub to 
             identity filenames.

В основном, это говорит команде SSH смотреть на файл ключей, в котором Вы нуждаетесь для аутентификации на целевом сервере. Если Вы используете ключевую аутентификацию и были предоставлены сертификату, это - то, где Вы хотите указать его. Если Вы используете нормального автора пароля, игнорируете ту опцию.

кроме того, для будущего, это легче к вещам Google как это. Вы потратите меньше усилия, и Вы получите ответ быстрее.

5
ответ дан 28 September 2019 в 15:50

От страница справочника

-i identity_file

   Selects a file from which the identity (private key) for public
   key authentication is read.  The default is ~/.ssh/identity for
   protocol version 1, and ~/.ssh/id_dsa, ~/.ssh/id_ecdsa,
   ~/.ssh/id_ed25519 and ~/.ssh/id_rsa for protocol version 2.
   Identity files may also be specified on a per-host basis in the
   configuration file.  It is possible to have multiple -i options
   (and multiple identities specified in configuration files).  If
   no certificates have been explicitly specified by the
   CertificateFile directive, ssh will also try to load certificate
   information from the filename obtained by appending -cert.pub to
   identity filenames.
4
ответ дан 28 September 2019 в 15:50

Другие вопросы по тегам:

Похожие вопросы: