@AsphaltHero_0
Road to DevOps

Почему не могу скопировать свой ssh на другую ноду?

День добрый!
Почему-то не могу скопировать свой ssh на другую ноду.
С хостовой ОС пишу ssh-copy-id -i root@192.168.1.150
Ошибка ERROR: failed to open ID file 'root@192.168.1.150.pub': No such file.
Пробовал указать полный путь до .ssh. Не помогло.
В файле /etc/ssh/sshd_config стоит #PasswordAuthentication yes.
  • Вопрос задан
  • 731 просмотр
Решения вопроса 2
Rsa97
@Rsa97
Для правильного вопроса надо знать половину ответа
Потому что после опции -i должен идти путь к файлу с открытым ключом.
$ man ssh-copy-id
...
-i identity_file
             Use only the key(s) contained in identity_file (rather than looking for identities via ssh-add(1)
             or in the default_ID_file).  If the filename does not end in .pub this is added.  If the filename
             is omitted, the default_ID_file is used.
...
Ответ написан
@Akela_wolf
Extreme Programmer
man ssh-copy-id
-i identity_file

Use only the key(s) contained in identity_file (rather than looking for identities via ssh-add(1) or in the default_ID_file). If the filename does not end in .pub this is added. If the filename is omitted, the default_ID_file is used.

Note that this can be used to ensure that the keys copied have the comment one prefers and/or extra options applied, by ensuring that the key file has these set as preferred before the copy is attempted.


Что вы сказали - то команда и пытается сделать: использовать ключ root@192.168.1.150 которого не находит, о чем вам и сообщает.
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы