Перевод этой страницы:
  • ru

Linux - ssh - подключиться через приватный ключ

Использовать опцию -i:

   
 -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 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).  ssh will also try to load certificate information from the filename obtained by appending -cert.pub to identity filenames.

Пример подключения с приватным ключем:

 # ssh -i your_private_key user1@server1
Править страницу
Наверх