Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ubuntu 7.10 OpenSSH Port geblockt?

Empfohlene Antworten

Veröffentlicht

Hallo,

ich hab hier bei Kubuntu den OpenSSH Server installiert und FreeNX und will von einem Laptop mit WinXP aus darauf zugreifen.

OpenSSH-Server installiert, ssh localhost läuft. FreeNX installiert, Client gestartet, Verbindung zu localhost läuft.

Wenn ich das ganze aber vom Laptop aus mache (egal ob WLan oder LAN) bekomm ich keine Verbindung hin.


Starting Nmap 4.20 ( http://insecure.org ) at 2007-10-25 12:34 CEST

Interesting ports on 192.168.1.1:

PORT   STATE SERVICE

22/tcp open  ssh

Das kommt lokal.

Starting Nmap 4.20 ( http://insecure.org ) at 2007-10-25 12:32 CEST

Interesting ports on 192.168.1.1:

PORT   STATE SERVICE

22/tcp filtered  ssh

Das auf dem Windows Rechner.

Ich hab keine Firewall o.ä. installiert (zumindest nicht dass ich wüßte), nur ein Router hängt dazwischen (Linksys WRT-54GL mit Tomato Firmware 1.10). Aber der sollte doch intern nichts blocken oder filtern...

Hat jemand ne Idee woran das liegen könnte?


sudo iptables -L


Chain INPUT (policy ACCEPT)

target     prot opt source               destination


Chain FORWARD (policy ACCEPT)

target     prot opt source               destination


Chain OUTPUT (policy ACCEPT)

target     prot opt source               destination

Nachtrag:

Wenn ich lokal nen Scan auf Port 23 mache kommt da closed. Wenn ich den Scan auf Port 23 vom Laptop aus mache, steht da auch filtered.

iptables läuft nicht:


ps ax|grep iptables

10796 pts/0    S+     0:00 grep iptables

Mit Wireshark seh ich auch, dass da was auf Port 22 ankommt, aber wenn ich sshd im Debugmodus starte, passiert da gar nichts. Nur wenn ich mich von lokal anmelde gibt er ne Menge aus. Vom Laptop kommt nichts. Ich hab den SSH-Server auch schon deinstalliert und wieder neu installiert. Ja, unsinnig, aber woanders hab ich im Forum was gefunden, der hat sein Problem so lösen können. Wireshark:

1	0.000000	192.168.1.101	192.168.1.1	TCP	2383 > ssh [SYN] Seq=0 Len=0 MSS=1460

2	0.000004	192.168.1.1	192.168.1.101	TCP	ssh > 2383 [RST, ACK] Seq=0 Ack=1 Win=0 Len=0

3	2.866579	192.168.1.101	192.168.1.1	TCP	2383 > ssh [SYN] Seq=0 Len=0 MSS=1460

4	2.866596	192.168.1.1	192.168.1.101	TCP	ssh > 2383 [RST, ACK] Seq=0 Ack=1 Win=0 Len=0

5	8.901134	192.168.1.101	192.168.1.1	TCP	2383 > ssh [SYN] Seq=0 Len=0 MSS=1460

Das is das was bei einem Anmeldeversuch mit Putty passiert. (Windows Firewall aus und an is egal, sollte ja eh nur eingehend funktionieren)

iptables läuft nicht:


ps ax|grep iptables

10796 pts/0    S+     0:00 grep iptables

Mit Wireshark seh ich auch, dass da was auf Port 22 ankommt, aber wenn ich sshd im Debugmodus starte, passiert da gar nichts. Nur wenn ich mich von lokal anmelde gibt er ne Menge aus. Vom Laptop kommt nichts. Ich hab den SSH-Server auch schon deinstalliert und wieder neu installiert. Ja, unsinnig, aber woanders hab ich im Forum was gefunden, der hat sein Problem so lösen können. Wireshark:

1	0.000000	192.168.1.101	192.168.1.1	TCP	2383 > ssh [SYN] Seq=0 Len=0 MSS=1460

2	0.000004	192.168.1.1	192.168.1.101	TCP	ssh > 2383 [RST, ACK] Seq=0 Ack=1 Win=0 Len=0

3	2.866579	192.168.1.101	192.168.1.1	TCP	2383 > ssh [SYN] Seq=0 Len=0 MSS=1460

4	2.866596	192.168.1.1	192.168.1.101	TCP	ssh > 2383 [RST, ACK] Seq=0 Ack=1 Win=0 Len=0

5	8.901134	192.168.1.101	192.168.1.1	TCP	2383 > ssh [SYN] Seq=0 Len=0 MSS=1460


oder auch mal ein


8	550.234584	192.168.1.1	192.168.1.101	TCP	ssh > 2384 [SYN, ACK] Seq=0 Ack=1 Win=5840 Len=0 MSS=1460

Das is das was bei einem Anmeldeversuch mit Putty passiert. (Windows Firewall aus und an is egal, sollte ja eh nur eingehend funktionieren)

Nur mal zur Info, ich hab es jetzt hinbekommen, also zumindest das mit FreeNX. Die Verbindung (über ssh) läuft auch, allerdings nur über eine externe (DynDNS) Adresse. Wenn ich von hier erst raus ins Netz gehe und dann zurückkomme, dann kann ich mich beim SSH-Server einloggen. Wenn ich das im lokalen Netz versuche, kommt nichts bzw ein Timeout.

Es liegt nicht an Windows. Auch eine VM (auf meinem Rechner hier, bridged) und Kubuntu-Live zeigen dieselben Symptome. Irgendwie will mein Rechner keine ssh-Verbindung aus dem lokalen Netz. Es ist aber nichts eingetragen in der hosts.deny o.ä.

Bin mal gespannt ob ich das noch rausbekomme, was daran schuld ist...

Wie sieht denn deine sshd_config aus?

Kann denn der Rechner, von dem du versuchst eine SSH-Verbindung herzustellen, ueberhaupt das Geraet erreichen, sprich, ist er "pingbar"? Vll. fehlt ja n Routing-Eintrag o.ae.

Also ich hab keine Firewall installiert. Bzw. ich hab um das zu testen mal Guarddog installiert, was ja ein GUI für iptables ist. Hab das mal aktiviert und dann wieder deaktiviert. Man merkt schon einen unterschied, aber es ist jetzt aus, definitiv. Auch sonst hab ich keine shorewall oder ähnliches laufen.

Ja, der Rechner kann den anderen "sehen", also anpingen. Mit Wireshark seh ich ja auch, dass Daten ankommen, nur reagiert da wohl niemand darauf.

Die sshd_config ist die normale Standard-config, ich hab auch ma den Port geändert zwischendurch u.ä. aber bringt nichts.

# Package generated configuration file

# See the sshd(8) manpage for details

# What ports, IPs and protocols we listen for

Port 22

# Use these options to restrict which interfaces/protocols sshd will bind to

#ListenAddress ::

ListenAddress 0.0.0.0

Protocol 2

# HostKeys for protocol version 2

HostKey /etc/ssh/ssh_host_rsa_key

HostKey /etc/ssh/ssh_host_dsa_key

#Privilege Separation is turned on for security

UsePrivilegeSeparation yes

# Lifetime and size of ephemeral version 1 server key

KeyRegenerationInterval 3600

ServerKeyBits 768

# Logging

SyslogFacility AUTH

LogLevel INFO

# Authentication:

LoginGraceTime 120

PermitRootLogin no

StrictModes yes

RSAAuthentication yes

PubkeyAuthentication yes

#AuthorizedKeysFile %h/.ssh/authorized_keys

# Don't read the user's ~/.rhosts and ~/.shosts files

IgnoreRhosts yes

# For this to work you will also need host keys in /etc/ssh_known_hosts

RhostsRSAAuthentication no

# similar for protocol version 2

HostbasedAuthentication no

# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication

#IgnoreUserKnownHosts yes

# To enable empty passwords, change to yes (NOT RECOMMENDED)

PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with

# some PAM modules and threads)

ChallengeResponseAuthentication no

# Change to no to disable tunnelled clear text passwords

#PasswordAuthentication yes

# Kerberos options

#KerberosAuthentication no

#KerberosGetAFSToken no

#KerberosOrLocalPasswd yes

#KerberosTicketCleanup yes

# GSSAPI options

#GSSAPIAuthentication no

#GSSAPICleanupCredentials yes

X11Forwarding yes

X11DisplayOffset 10

PrintMotd no

PrintLastLog yes

TCPKeepAlive yes

#UseLogin no

#MaxStartups 10:30:60

#Banner /etc/issue.net

# Allow client to pass locale environment variables

AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server

UsePAM yes

Bind an die IP6-Adresse hab ich auskommentiert. Es kam beim manuellen starten von sshd da immer zu einem "Konflikt", also zumindest die Meldung, dass die Adresse schon belegt sei.

Was mich eigentlich wundert ist, dass der Zugriff von "außen" ja geht. Also aus dem Internet log ich mich (mit Portforwarding, umgeleitet auf Port 22) ganz normal ein. :confused:

Schreib mal noch

UseDNS no

mit in die sshd_config. Das bewirkt, das der Server nicht versucht die Adresse des Clients aufzuloesen. Vll. klappt ja der Login jetzt schon, aber nicht sofort, weil der Server erst versucht die Client-Adresse aufzuloesen.

Sonst wueßte ich auch nichts mehr.

Hat nichts gebracht :(

Es kommt immer noch ein Connection Timeout.

Hat nichts gebracht :(

Es kommt immer noch ein Connection Timeout.

Was sagen die Log-Dateien in /var/log?

Hast du mal den sshd mit aptitude purge deinstalliert und wieder installiert?

Hi, bin leider nicht daheim und werde vor Donnerstag abend, oder wohl eher Freitag abend auch nicht dazu kommen hier was zu posten. Aber AFAIR waren die Logs syslog und messages leer, also zumindest was die ssh anmeldung angeht. tail -f hat da nichts angezeigt. Aber ich probier das dann nochmal.

Ausgabe von netstat -antp | grep 22 und ps -ef | grep <pid des bei netstat horchenden prozesses> posten...


:~$ sudo netstat -antp | grep 22

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     5700/sshd


:~$ sudo ps -ef | grep 5700

root      5700     1  0 15:05 ?        00:00:00 /usr/sbin/sshd

jesterday      17421  6525  0 22:36 pts/0    00:00:00 grep 5700

Und die Logs sind leer (also was das einloggen angeht) oder meintest du andere als messages und syslog?

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.