Errors SSH в Linux

Contents
/usr/bin/ssh-copy-id: ERROR: No identities found
Permissions 0644 are too open
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
The authenticity of host X can't be established.

No identities found

/usr/bin/ssh-copy-id: ERROR: No identities found

Скорее всего не найдет путь до ключа. Укажите его явно с помощью флага -i

Пример

Permissions 0644 are too open.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0644 for '/home/user/.ssh/id_rsa.pub' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. Load key "/home/user/.ssh/id_rsa.pub": bad permissions

Скорее всего вы делаете проверку неправильного ключа.

ssh -i ~/.ssh/id_rsa.pub user@192.168.0.2

А нужно

ssh -i ~/.ssh/id_rsa user@192.168.0.2

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

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

ssh user@192.168.1.2

ERROR: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ERROR: @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ ERROR: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ERROR: IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! ERROR: Someone could be eavesdropping on you right now (man-in-the-middle attack)! ERROR: It is also possible that a host key has just been changed. ERROR: The fingerprint for the ECDSA key sent by the remote host is ERROR: SHA256:abcde/accdefghijkld9UNaDBnnUHanJ9Svca9vFx7c. ERROR: Please contact your system administrator. ERROR: Add correct host key in /home/user/.ssh/known_hosts to get rid of this message. ERROR: Offending ECDSA key in /home/user/.ssh/known_hosts:3 ERROR: remove with: ERROR: ssh-keygen -f "/home/user/.ssh/known_hosts" -R "192.168.1.2" ERROR: ECDSA host key for 192.168.1.2 has changed and you have requested strict checking. ERROR: Host key verification failed.

Из строки

ERROR: Offending ECDSA key in /home/user/.ssh/known_hosts:3

Можно понять, что проблема вызвана третьей строкой файла /home/user/.ssh/known_hosts

Если вы уверены в надёжности хоста к которому подключаетесь, то можете просто удалить эту строку и подключиться снова

sed -i 3d /home/$(whoami)/.ssh/known_hosts

ssh-keygen -R 192.168.1.2

В случае более сложных подключений, предупреждение может быть по поводу определённого порта

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the ED25519 key sent by the remote host is SHA256:nN5D5mBv00vkinsOmKbaKN1o2dEVZj5BidWaKBY1LpA. Please contact your system administrator. Add correct host key in /home/username/.ssh/known_hosts to get rid of this message. Offending ED25519 key in /home/username/.ssh/known_hosts:14 remove with: ssh-keygen -f "/home/username/.ssh/known_hosts" -R "[192.168.56.103]:1234" ED25519 host key for [192.168.56.103]:1234 has changed and you have requested strict checking. Host key verification failed.

В этом случае подсказка по-прежнему содержится в предупреждении (выделил её зелёным).

Выполните

ssh-keygen -f "/home/username/.ssh/known_hosts" -R "[192.168.56.103]:1234"

# Host [192.168.56.103]:1234 found: line 14 /home/username/.ssh/known_hosts updated. Original contents retained as /home/username/.ssh/known_hosts.old

The authenticity of host X can't be established.

Если вы видите в логах подключения следующую ошибку

The authenticity of host '192.168.56.103 (192.168.56.103)' can't be established.

Первым делом перейдите в ~/.ssh и проверьте наличие и содержание файла known_hosts а также права на него.

cd ~/.ssh
ls -la
vi known_hosts

Article author: Andrei Olegovich

Related articles
SSH
Errors SSH
Linux
Bash
Network Configuration
sudo
SCP: обмен файлами;
C
C++
Networks
Кибербезопасность
RDP через SSH
Telnet

Search this site

Subscribe to Telegram channel @aofeed to follow new articles and updates to old ones

Go to channel

@aofeed

Ask a question in the Telegram group

@aofeedchat

Contacts and cooperation:
I recommend our hosting beget.ru
Write to info@urn.su, info@aredel.com if you:
1. Want to write an article for our site or translate an article into your native language.
2. Want to place thematically relevant ads on the site.
3. Ads on my site pass maximum censorship. If you see an ad block unsuitable for school-age children, shocking or misleading - please contact us by e-mail
4. Found a mistake, inaccuracy, bug, etc. on the site. ... .......
5. Articles can be shared on social media by clicking a network icon: