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  2013-07-04 23:18:22

  czater - Użytkownik

czater
Użytkownik
Zarejestrowany: 2008-03-24

ssh przy użyciu klucza a przesyłanie wersji sys operacyjnego

Witam

Skonfigurowałem dziś logowanie za pomocą klucza ssh do połączenia z inną maszyną. Włączyłem Wireshark-a podczas nawiązywania połączenia ssh iizauważyłem że systemy wymieniają się niezaszyfrowaną informacją o systemie operacyjnym i jego wersji. Czy jest sposób na zablokowanie wyświetlania tej informacji ?

Offline

 

#2  2013-07-05 00:59:40

  jurgensen - Użytkownik

jurgensen
Użytkownik
Skąd: Wrocław
Zarejestrowany: 2010-01-26

Re: ssh przy użyciu klucza a przesyłanie wersji sys operacyjnego

Całkowicie nie wyłączysz tego (wersja protokołu i oprogramowania), ponieważ jest to wyszczególnione w RFC 4253 (The Secure Shell (SSH) Transport Layer Protocol):

4.2. Protocol Version Exchange


   When the connection has been established, both sides MUST send an
   identification string.  This identification string MUST be

      SSH-protoversion-softwareversion SP comments CR LF

   Since the protocol being defined in this set of documents is version
   2.0, the 'protoversion' MUST be "2.0".  The 'comments' string is
   OPTIONAL.  If the 'comments' string is included, a 'space' character
   (denoted above as SP, ASCII 32) MUST separate the 'softwareversion'
   and 'comments' strings.  The identification MUST be terminated by a
   single Carriage Return (CR) and a single Line Feed (LF) character
   (ASCII 13 and 10, respectively).  Implementers who wish to maintain
  compatibility with older, undocumented versions of this protocol may
   want to process the identification string without expecting the
   presence of the carriage return character for reasons described in
   Section 5 of this document.  The null character MUST NOT be sent.
   The maximum length of the string is 255 characters, including the
   Carriage Return and Line Feed.

   The part of the identification string preceding the Carriage Return
   and Line Feed is used in the Diffie-Hellman key exchange (see Section
   8).

   The server MAY send other lines of data before sending the version
   string.  Each line SHOULD be terminated by a Carriage Return and Line
   Feed.  Such lines MUST NOT begin with "SSH-", and SHOULD be encoded
   in ISO-10646 UTF-8 [RFC3629] (language is not specified).  Clients
   MUST be able to process such lines.  Such lines MAY be silently
   ignored, or MAY be displayed to the client user.  If they are
   displayed, control character filtering, as discussed in [SSH-ARCH],
   SHOULD be used.  The primary use of this feature is to allow TCP-
   wrappers to display an error message before disconnecting.

   Both the 'protoversion' and 'softwareversion' strings MUST consist of
   printable US-ASCII characters, with the exception of whitespace
   characters and the minus sign (-).  The 'softwareversion' string is
   primarily used to trigger compatibility extensions and to indicate
   the capabilities of an implementation.  The 'comments' string SHOULD
   contain additional information that might be useful in solving user
   problems.  As such, an example of a valid identification string is

      SSH-2.0-billsSSH_3.6.3q3<CR><LF>

   This identification string does not contain the optional 'comments'
   string and is thus terminated by a CR and LF immediately after the
   'softwareversion' string.

   Key exchange will begin immediately after sending this identifier.
   All packets following the identification string SHALL use the binary
   packet protocol, which is described in Section 6.[/quote]
Jest to również wyjaśnione w FAQ OpenSSH:

2.14 - Why does OpenSSH report its version to clients?

OpenSSH, like most SSH implementations, reports its name and version to clients when they connect, e.g.

    SSH-2.0-OpenSSH_3.9

This information is used by clients and servers to enable protocol compatibility tweaks to work around changed, buggy or missing features in the implementation they are talking to. This protocol feature checking is still required at present because versions with incompatibilities are still in wide use.[/quote]
W Debianie natomiast możesz wyłączyć samą część komentarza, wskazującą na używany system operacyjny dodając do konfiguracji opcję:

Kod:

DebianBanner no

Offline

 

#3  2013-07-07 09:57:28

  Jacekalex - Podobno człowiek...;)

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

Re: ssh przy użyciu klucza a przesyłanie wersji sys operacyjnego

W  serwerze ssh można wyłączyć takie gadulstwo opcją:

Kod:

PrintMotd no

w pliku /etc/ssh/sshd_config.

Trzeba po prostu dodać, lub zmienić tą opcję, jeśli jest ustawiona inaczej.
Radzę spróbować.


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

Offline

 

#4  2013-07-07 12:22:47

  jurgensen - Użytkownik

jurgensen
Użytkownik
Skąd: Wrocław
Zarejestrowany: 2010-01-26

Re: ssh przy użyciu klucza a przesyłanie wersji sys operacyjnego

Koledze Czater nie chodziło o wyświetlanie MOTD, a wymianę informacji o używanej wersji OpenSSH, jeszcze przed zestawieniem zaszyfrowanej sesji.

Offline

 

#5  2013-07-07 12:42:32

  Jacekalex - Podobno człowiek...;)

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

Re: ssh przy użyciu klucza a przesyłanie wersji sys operacyjnego

[quote=jurgensen]Koledze Czater nie chodziło o wyświetlanie MOTD, a wymianę informacji o używanej wersji OpenSSH, jeszcze przed zestawieniem zaszyfrowanej sesji.[/quote]
Oczywiscie, tylko dlaczego po wyłaczeniu motd u mnie wysyła tylko taki nagłówek?

Kod:

OpenSSH_5.9p1-hpn13v11, OpenSSL 1.0.1e 11 Feb 2013

Wcześniej tez miałem podobną sytuację.

Problem w Debianie chyba polega na nazwie OS w identyfikacji  programu, np Opennsh-4.9-debian6 czy coś w tym guście.

Ostatnio edytowany przez Jacekalex (2013-07-08 11:22:30)


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

Offline

 

#6  2013-07-08 11:11:41

  czater - Użytkownik

czater
Użytkownik
Zarejestrowany: 2008-03-24

Re: ssh przy użyciu klucza a przesyłanie wersji sys operacyjnego

Dziękuje za pomoc. Pomogła zmiana w pliku konfiguracyjnym ssh na

Kod:

DebianBanner no

przez co nie wyświetla wersji systemu operacyjnego.

Offline

 

Stopka forum

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

[ Generated in 0.012 seconds, 11 queries executed ]

Informacje debugowania

Time (s) Query
0.00010 SET CHARSET latin2
0.00003 SET NAMES latin2
0.00114 SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='3.239.52.235' WHERE u.id=1
0.00087 REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '3.239.52.235', 1711697681)
0.00066 SELECT * FROM punbb_online WHERE logged<1711697381
0.00114 SELECT topic_id FROM punbb_posts WHERE id=236650
0.00164 SELECT id FROM punbb_posts WHERE topic_id=23885 ORDER BY posted
0.00079 SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=23885 AND t.moved_to IS NULL
0.00006 SELECT search_for, replace_with FROM punbb_censoring
0.00122 SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=23885 ORDER BY p.id LIMIT 0,25
0.00131 UPDATE punbb_topics SET num_views=num_views+1 WHERE id=23885
Total query time: 0.00896 s