[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Zugriff auf den Rechner von außen



Am Mittwoch, 19. März 2014, 17:48:23 schrieb Jens Schüßler:
> * Volker Wysk <pf3@volker-wysk.de> wrote:
> > Hallo!
> > 
> > Ich möchte von außen, also aus dem Internet (nicht bloß aus dem lokalen
> > Netz) auf meinen Rechner zugreifen. Dazu habe ich ssh installiert. Im
> > Router habe ich Port-Forwarding für die Ports 22 (ssh) und 115 (sftp)
> > eingerichtet.
> > 
> > Die externe IP-Adresse findet man über http://www.meineip.de/, oder über
> > die Router-Weboberfläche, heraus.
> > 
> > Auf localhost kann ich mich mit ssh einloggen. Nicht aber über die externe
> > IP-
> > Adresse. Da kommt:

> Lauschte dein sshd überhaupt auf einem anderen Interface als localhost?

Es sieht so aus. In den Konfigurationsdateien in /etc/ssh sind keine Hosts 
aufgeführt.

> 
> > ~ % ssh 85.179.114.16
> > ssh_exchange_identification: Connection closed by remote host
> > 
> > ~ % ssh 85.179.114.16 -p22
> > ssh_exchange_identification: Connection closed by remote host
> 
> ssh -v benutzen, dann siehts du mehr, mit -vv noch mehr.

Da kommt:

~ % ssh -v 85.179.114.16
OpenSSH_6.5, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 85.179.114.16 [85.179.114.16] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.5p1 Debian-6
ssh_exchange_identification: Connection closed by remote host

Interessant sind die zwei Zeilen:

debug1: Connecting to 85.179.114.16 [85.179.114.16] port 22.
debug1: Connection established.

Das sieht so aus, als ob die Verbindug zum SSH-Server erst hergestellt, doch 
der verweigert dann das Einloggen. Richtig?


> > Ich bin mir nicht sicher, ob die Verbindung bis zu meiner Maschine geht,
> 
> Dann schau in /var/log/auth.log deiner Machine nach, dort müsstest du
> deine Einlogversuche sehen.

Da sind keine Einlogversuche von  85.179.114.16 protokolliert, aber solche von 
localhost.

> Was steht zu ssh in der /etc/hosts.allow?

hosts.allow und hosts.deny sind leer (bis auf Kommentare).


Bis dann
Volker


Reply to: