Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!

Ogłoszenie

Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.

#1  2017-08-08 17:24:18

  pawel2006 - Nowy użytkownik

pawel2006
Nowy użytkownik
Zarejestrowany: 2017-08-08

Problem z SSH logowanie na niektóre urządzenia

Witam serdecznie :)

Mam dziwny problem na swoim systemie. Nie mogę się zalogować na niektóre urządzenia w sieci. Sytuacja wygląda tak, że np na ip 172.16.1.95 loguje się bez problemu czy to z kluczem czy też bez a np na 172.16.1.78 już niestety nie mogę. Adres nie jest dodany nigdzie do blokady,ping do urządzenia jest, nawet z innego serwera się mogę zalogować czy to nawet przez putty a z tego konkretnego nie moge.
Gdzie szukać przyczyny ?
Wersja debiana to

Kod:

root@jaszczur:~# uname -a
Linux jaszczur 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u2 (2017-06-26) x86_64 GNU/Linux

po odpaleniu ssh na dany adres wygląda to tak :

Kod:

root@jaszczur:~# ssh admin@172.16.1.78 -p 60022
^C
root@jaszczur:~# ssh -v admin@172.16.1.78 -p 60022
OpenSSH_6.7p1 Debian-5+deb8u3, OpenSSL 1.0.1t  3 May 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 172.16.1.78 [172.16.1.78] port 60022.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/identity type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/identity-cert type -1
debug1: identity file /root/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type 2
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519-cert type -1

root@jaszczur:~# ssh -v ubnt@172.16.1.111 -p 60022
OpenSSH_6.7p1 Debian-5+deb8u3, OpenSSL 1.0.1t  3 May 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 172.16.1.111 [172.16.1.111] port 60022.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/identity type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/identity-cert type -1
debug1: identity file /root/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type 2
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519-cert type -1

Konfiguracja sshd

Kod:

root@jaszczur:~# grep -vE '^[[:space:]]*(#|$)' /etc/ssh/sshd_config
Port 60022
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
UsePrivilegeSeparation yes
KeyRegenerationInterval 3600
ServerKeyBits 1024
SyslogFacility AUTH
LogLevel INFO
LoginGraceTime 120
PermitRootLogin without-password
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yes
root@jaszczur:~#

Konfiguracja ssh

Kod:

Host *
#   ForwardAgent no
#   ForwardX11 no
#   ForwardX11Trusted yes
#   RhostsRSAAuthentication no
#   RSAAuthentication yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   GSSAPIKeyExchange no
#   GSSAPITrustDNS no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
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
#   RekeyLimit 1G 1h
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes
    GSSAPIDelegateCredentials no

Pomocy prosze :(

Ostatnio edytowany przez pawel2006 (2017-08-08 17:26:37)

Offline

 

#2  2017-08-10 15:37:36

  seler - Użytkownik

seler
Użytkownik
Zarejestrowany: 2012-05-15

Re: Problem z SSH logowanie na niektóre urządzenia

Łączysz się bezpośrednio, nie przez jakieś VPNy? Kiedyś nie mogłem się dniami zalogować na jedną maszynkę, mimo że odpowiadała na pingi. Czytanie logów, debugowanie ssh nic nie pomagało - pomogło proste /etc/init.d/openvpn restart na routerze.


a to feler westchnął seler

Offline

 

#3  2017-08-10 17:57:30

  pawel2006 - Nowy użytkownik

pawel2006
Nowy użytkownik
Zarejestrowany: 2017-08-08

Re: Problem z SSH logowanie na niektóre urządzenia

Właśnie bezpośrednio. Serwer i klient jest w tej samej sieci. Z innego serwera bez problemu sie łącze a z tego konkretnego nie chce się za cholere

Offline

 

#4  2017-08-10 17:59:06

  mati75 - Psuj

mati75
Psuj
Skąd: masz ten towar?
Zarejestrowany: 2010-03-14

Re: Problem z SSH logowanie na niektóre urządzenia

Sprawdź czy nie jest w host.deny


https://l0calh0st.pl/obrazki/userbar.png

Offline

 

#5  2017-08-10 20:42:46

  pawel2006 - Nowy użytkownik

pawel2006
Nowy użytkownik
Zarejestrowany: 2017-08-08

Re: Problem z SSH logowanie na niektóre urządzenia

mati75 napisał(-a):

Sprawdź czy nie jest w host.deny

Nie jest dodany, sprawdzalem na samym początku wlasnie. to jest prawie czysta instalacja systemu gdzie nie ma praktycznie nic  a mimo to nie dziala

Offline

 

#6  2017-08-10 21:02:47

  Jacekalex - Podobno człowiek...;)

Jacekalex
Podobno człowiek...;)
Skąd: /dev/random
Zarejestrowany: 2008-01-07

Re: Problem z SSH logowanie na niektóre urządzenia

Kod:

GSSAPIAuthentication yes

używasz tego mechanizmu?

Jeśli nie, to spróbuj go wyłączyć.

Poza tym na logu debug klienta szuka pierdyliona kluczy SSH i twierdzi, że nie znalazł żadnego.

Przydałoby się zobaczyć w logach serwera, co ma do powiedzenia serwerek SSH na nieudaną próbę logowania klienta.
Może problematyczny host jest na serwerze dodany do ~/.ssh/known_hosts
i z tego powodu go nie wpuszcza, bo mu się coś z kluczem nie zgadza?

Logi serwera SSH są tutaj rozstrzygające.

Poza tym przydałaby się mała aktualizacja bezpieczeństwa, masz tam:

Kod:

OpenSSH_6.7p1 Debian-5+deb8u3

a tymczasem w stabilnym wydaniu Debiana jest teraz:

Kod:

openssh-server                                1:7.4p1-10+deb9u1

natomiast stabilny w Gentoo jest:

Kod:

net-misc/openssh-7.5_p1-r1

Różne wersje SSH na komputerze z którego się łączysz i na serwerze też mogą być problemem, jeżeli któraś ze stron  nie akceptuje takiego czy innego algorytmu szyfrowania albo formatu klucza ssh.

Ostatnio edytowany przez Jacekalex (2017-08-10 21:21:07)


W demokracji każdy naród ma taką władzę, na jaką zasługuje ;)
Si vis pacem  para bellum  ;)       |       Pozdrawiam :)

Offline

 

Stopka forum

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
Możesz wyłączyć AdBlock — tu nie ma reklam ;-)