Я пытаюсь сгенерировать пару ключей (без ключевой фразы) на удаленной машине. Команда, которую я использую для этого:
ssh root@REMOTEIP ssh-keygen -t rsa -f /root/.ssh/id_rsa_new -q -N ""
Вывод этой команды:
ssh-keygen: option requires an argument -- N
Usage: ssh-keygen [options]
Options:
-a trials Number of trials for screening DH-GEX moduli.
-B Show bubblebabble digest of key file.
-b bits Number of bits in the key to create.
-C comment Provide new comment.
-c Change comment in private and public key files.
-e Convert OpenSSH to IETF SECSH key file.
-F hostname Find hostname in known hosts file.
-f filename Filename of the key file.
-G file Generate candidates for DH-GEX moduli.
-g Use generic DNS resource record format.
-H Hash names in known_hosts file.
-i Convert IETF SECSH to OpenSSH key file.
-l Show fingerprint of key file.
-M memory Amount of memory (MB) to use for generating DH-GEX moduli.
-N phrase Provide new passphrase.
-P phrase Provide old passphrase.
-p Change passphrase of private key file.
-q Quiet.
-R hostname Remove host from known_hosts file.
-r hostname Print DNS resource record.
-S start Start point (hex) for generating DH-GEX moduli.
-T file Screen candidates for DH-GEX moduli.
-t type Specify type of key to create.
-v Verbose.
-W gen Generator to use for generating DH-GEX moduli.
-y Read private key file and print public key.
Когда я использую фразу-пароль, команда работает просто отлично:
ssh root@REMOTEIP ssh-keygen -t rsa -f /root/.ssh/id_rsa_new -q -N "12345"