Nowe posty

xx Dystrybucja pod HP Omen (6)
2024-03-27, 23:30:08
xx [Poradnik] Wyszukiwanie Sterowników (2)
2024-03-27, 21:08:23
lamp Problem z Linux Lite po instalacji (0)
2024-03-27, 19:50:30
xx Ile pingwinów? (1)
2024-03-27, 08:59:24
xx konfiguracja pale moon (0)
2024-03-24, 21:53:42
xx Plasma 6 w Neonie ssie trochę mniej ... (10)
2024-03-23, 02:38:11
xx problem z instalacja sterowników do karty sieciowej (3)
2024-03-18, 18:10:16
xx Plik abc.001 (1)
2024-03-17, 17:48:27
xx Zlecę dopracowanie programu w MatLab (0)
2024-03-13, 15:28:40
xx Linux Mint 21.3 XFCE brak dźwieku po paru minutach (karta muzyczna zintegrowana) (5)
2024-03-12, 23:07:01

Autor Wątek: Ssh client nie wpuszcza, ze względu na klucz  (Przeczytany 6092 razy)

  • Gość
Ssh client nie wpuszcza, ze względu na klucz
« dnia: 2010-11-14, 23:08:27 »
Pytanie, dlaczego zamiast zapytać się, czy zechcesz dodać obcy klucz do bazy, to sytem od razu fuczy się na mnie, że to atak man in the middle?

Cytuj
tomasz@darkstar:~/Dokumenty/dane/sources/icon$ ssh tomasz@localhost
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
cc:ce:6a:ea:a9:b3:44:07:5d:0e:25:2c:09:d6:e5:60.
Please contact your system administrator.
Add correct host key in /home/tomasz/.ssh/known_hosts to get rid of this message.
Offending key in /home/tomasz/.ssh/known_hosts:4
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
Permission denied (publickey,password,keyboard-interactive).
tomasz@darkstar:~/Dokumenty/dane/sources/icon$
Zdziwił mnie też fakt, że autoryzacja za pomocą klawiatury i hasła jest zablokowana, bo w pliku konfiguracyjnym jest napisane jak byk.

/etc/ssh/ssh_config:

#	$OpenBSD: ssh_config,v 1.26 2010/01/11 01:39:46 dtucker Exp $

# This is the ssh client system-wide configuration file.  See
# ssh_config(5) for more information.  This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.

# Configuration data is parsed as follows:
#  1. command line options
#  2. user-specific file
#  3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.

# Site-wide defaults for some commonly used options.  For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.

# Host *
#   ForwardAgent no
    ForwardX11 no
    RhostsRSAAuthentication yes
    RSAAuthentication yes
    PasswordAuthentication yes
    HostbasedAuthentication yes
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any

    ConnectTimeout 20
    StrictHostKeyChecking no
#   IdentityFile ~/.ssh/identity
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
    Port 22
#   Protocol 2,1
#   Cipher 3des
#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
#   VisualHostKey no
#   ProxyCommand ssh -q -W %h:%p gateway.example.com

koconmus

  • Gość
Ssh client nie wpuszcza, ze względu na klucz
« Odpowiedź #1 dnia: 2010-11-15, 10:21:10 »
I tak ma być, komunikat mówi wyraźnie że nie zgadza się identyfikacja komputera po drugiej stronie, ta zapisana w pliku ze znanymi hostami.

Nie wiem czemu nie pyta o autoryzację zmiany, najprościej wy edytować ten plik i usunąć odpowiednią linijkę.

polinux

  • Gość
Ssh client nie wpuszcza, ze względu na klucz
« Odpowiedź #2 dnia: 2011-07-03, 01:59:57 »
a moze na serverze jest klucz rsa ktory sie nie zgadza z twoim lokalnym?

Offline Paweł Kraszewski

  • Administrator
  • Guru
  • *****
  • Wiadomości: 3049
  • Lenistwo jest matką potrzeby = babcią wynalazku
    • Zobacz profil
Ssh client nie wpuszcza, ze względu na klucz
« Odpowiedź #3 dnia: 2011-07-03, 13:07:40 »
Generalnie plik konfiguracyjne jest prawie ok. System po prostu nie wie, do czego zastosować twoją politykę.
Odkomentuj Host * i powinno być OK. Ale z drugiej strony czy nie lepiej poprawić ten klucz?
Paweł Kraszewski
~Arch/Void/Gentoo/FreeBSD/OpenBSD/Specjalizowane customy