ecdsa key fingerprint is sha256

Я использовал множество виртуальных машин, используюя Oracle VirtualBox для тестирования и обучения.

На днях я попытался подключиться к одному из моих удаленных серверов, который работает с Arch Linux через SSH.

Вот как я использую SSH для моего удаленного сервера Arch от моей локальной системы.

Здесь sk — это мое имя пользователя удаленного сервера Arch Linux, а 192.168.1.102 — это IP-адрес Arch Linux.

После выполнения вышеуказанной команды я получил следующее предупреждающее сообщение.

Я не могу использовать SSH на удаленном сервере VM.

Я попытался войти с альтернативным именем пользователя, но получил тот же результат, что и выше.

После небольшого поиска в Google я понял, что эта ошибка произойдет, если ваша система использует динамическую IP-адресацию.

Таким образом, указанное предупреждающее сообщение будет появляться каждый раз, когда изменяется IP-адрес удаленного сервера.

Чтобы навсегда исправить эту ошибку, вы должны использовать статический IP-адрес и добавить ключ хоста только один раз.

Дело в том, что у всех нас нет статических IP-адресов, не так ли? Покупка статического IP-адреса не требуется для всех нас, и это тоже дорого.

Таким образом, вы можете решить эту ошибку, как описано ниже. Чтобы обойти эту проблему, сначала нам нужно обновить кеш-ключ ECDSA-хоста вашей удаленной системы в файле known_hosts вашей локальной системы.

Как вы, возможно, знаете, ключи хоста будут храниться в файле /home/yourusername/.ssh/known_hosts.

Чтобы удалить кешированный ключ, используйте следующую команду:

В нашем случае IP-адрес удаленной системы — 192.168.1.102, поэтому давайте использовать следующую команду для удаления ключа хоста из файла «known_hosts».

Теперь попробуйте снова зайти через ssh в удаленную систему с командой:

Введите «yes» и нажмите «enter», чтобы обновить ключ хоста вашей удаленной системы в файле known_hosts вашей локальной системы.

Теперь вы можете без проблем справиться с ssh в своей удаленной системе Arch Linux.

Этот метод будет работать не только на Arch Linux, но и на других дистрибутивах Linux.

I am trying to set two git accounts to handle two projects and didn’t find a correct way.

please consider for my problem thanks a lots.

Below is my setting and problems.

this is my config

During run git shown

ssh location are here

1 Answer 1

I finally found where was the problem.Here is my solution

Below is my step by step configuration

my project website

then in gitbash

and then go to the projet git repository site and copy the command

and then paste the command to the git bash and generate ssh key

and then type

after getting the key put the key to the repository sites

and then go back to git bash and add ssh to the agent

I have got the well-known warning message when trying to ssh into a server:

And I know why because I changed the ip of such server. But if it weren’t so, how could I check the fingerprint for the ECDSA key sent by the remote host?

I have tried to do so by:

But I don’t get the same fingerprint. I also tried «hostname,ip» kind of like in aws but I got no match.

If I delete the entrance from my known_hosts file and I try to ssh again, it succeeds and tells the following:

So to what is it applying the sha256sum to get the fingerprint and how I could check it?

closed as off-topic by mdpc, masegaloeh, MadHatter supports Monica, Jenny D says Reinstate Monica, mulaz May 11 ’15 at 13:55

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • «Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow.» – mdpc, masegaloeh, MadHatter supports Monica, Jenny D says Reinstate Monica, mulaz

If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

A public key fingerprint isn’t the simple hash of an IP string.

To retrieve a remote host public key you can use ssh-keyscan then your can use usual tools to extract its fingerprint ( ssh-keygen -lf

Finally you can compare to the current fingerprint in your known_hosts file with ssh-keygen -l -F .

A bit more in detail: Because the warning message refers to the fingerprint for the ECDSA key sent by the remote host we gather the info about the public (ecdsa) key of the host:

Then we can find out where in our known_hosts file that public (ecdsa) key is:

If we want to compare the fingerprints we have to put the contents of our known_hosts file (just the entry related to this host), we can call it ecdsa_file_from_known_hosts and then compare them as follows:

And check if the show the same hash.

Of course they don’t match, that is why I got the warning message (ssh checks this matching internally). If we are sure about the ip change (so we are not suffering a man-in-the-middle attack) we can just delete the entry of that host in our known_hosts file and the next time we ssh into it a new fresh entry for it will be added to such file.

Оцените статью