• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

[gelöst] SSH Ports

Bibaltik

Member
Da ich nicht so recht weiß wo ich mein Problem posten kann, poste ich es hier, weil ich denke hier passt es wohl am ehesten.

Welche Ports außer 22 benutzt ssh noch?

Hintergrund:

Mein neuer Router unterstützt wohl kein DMZ (zu mindestens nicht über Webinterface einstellbar), so bleibt nur Port forwarding. Habe im Router also den Port 22 auf 192.168.0.1 weitergeleitet.

Aber es geht leider nicht:

Code:
ssh: connect to host micha.homelinux.org port 22: Connection refused

local funktioniert ssh, nur bringt mir das nichts wenn ich ssh nicht at home benutzen möchte.

//Edit: Obwohl passt wohl eher in "TCP/IP-Netzwerke und Internetzugang"
 
Bibaltik schrieb:
Welche Ports außer 22 benutzt ssh noch?
Keinen.

Womit versuchst du dich denn zu verbinden? - Linux (Konsole: ssh)? - Windows (Putty)?
Was steht denn in den Logs über die Verbindungsversuche?
Mal mit
Code:
ssh -vv user@host
verbinden, um detailierte Information zu bekommen.

Bibaltik schrieb:
//Edit: Obwohl passt wohl eher in "TCP/IP-Netzwerke und Internetzugang"
Gehört IMHO eher in Security & Backup. :wink:
 
OP
Bibaltik

Bibaltik

Member
b3ll3roph0n schrieb:
Womit versuchst du dich denn zu verbinden? - Linux (Konsole: ssh)? - Windows (Putty)?

Mit beiden.

b3ll3roph0n schrieb:
Was steht denn in den Logs über die Verbindungsversuche?

Das ist es ja auch... da erscheint nichts. Also dropt wohl schon der Router?


b3ll3roph0n schrieb:
Mal mit
Code:
ssh -vv user@host
verbinden, um detailierte Information zu bekommen.

Bitte hier:

Code:
linpower:/home/micha # ssh -vv micha@micha.homelinux.org
OpenSSH_4.4p1, OpenSSL 0.9.8d 28 Sep 2006
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to micha.homelinux.org [85.177.241.15] port 22.
debug1: connect to address 85.177.241.15 port 22: Connection refused
ssh: connect to host micha.homelinux.org port 22: Connection refused

Dienst läuft aber:
Code:
linpower:/home/micha # netstat -atu | grep ssh
tcp        0      0 *:ssh                   *:*                     LISTEN

//edit: Also ich versuche mich im internen Netzwerk über micha.homelinux.org einzuloggen um zu testen ob der Zugang funktioniert. Habe jetzt anders leider keine Möglichkeit das zu testen. Ob dieser Router damit Probleme hat und es auf "normalen" Wege funktioniert?
 
OP
Bibaltik

Bibaltik

Member
Also meine ssh_config ist standard unverändert so wie sie auch unter mein alten Router funktioniert hatte.

Code:
#       $OpenBSD: ssh_config,v 1.22 2006/05/29 12:56:33 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

# If you do not trust your remote host (or its administrator), you
# should not forward X11 connections to your local X11-display for
# security reasons: Someone stealing the authentification data on the
# remote side (the "spoofed" X-server by the remote sshd) can read your
# keystrokes as you type, just like any other X11 client could do.
# Set this to "no" here for global effect or in your own ~/.ssh/config
# file if you want to have the remote X11 authentification data to
# expire after two minutes after remote login.
ForwardX11Trusted yes

#   RhostsRSAAuthentication no
#   RSAAuthentication yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/identity
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   Port 22
#   Protocol 2,1
#   Cipher 3des
#   Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no

# Set this to 'yes' to enable support for the deprecated 'gssapi' authentication
# mechanism to OpenSSH 3.8p1. The newer 'gssapi-with-mic' mechanism is included
# in this release. The use of 'gssapi' is deprecated due to the presence of
# potential man-in-the-middle attacks, which 'gssapi-with-mic' is not susceptible to.
#   GSSAPIEnableMITMAttack no

# This enables sending locale enviroment variables LC_* LANG, see ssh_config(5).
SendEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
SendEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
SendEnv LC_IDENTIFICATION LC_ALL

Prinzipiell denke ich das es am neuen WLan Router liegt, da ein ssh micha@localhost einwandfrei liegt. Nur kann ich bei dem neuen Router nur Port-Weiterleitungen einrichten.
 
OP
Bibaltik

Bibaltik

Member
Hm, hab wohl glaube den Fehler gefunden, aber keine Ahnung wie ich den beheben soll.

Hab nun mal Testweise ein Webserver aufgesetzt. Aber statt mein Webserver kommt mein Routerinterface, trotz Port-Weiterleitung. http://micha.homelinux.org

Nun weiß ich ja gar nicht weiter.

M** Router :evil:
 
Bibaltik schrieb:
Prinzipiell denke ich das es am neuen WLan Router liegt, da ein ssh micha@localhost einwandfrei liegt. Nur kann ich bei dem neuen Router nur Port-Weiterleitungen einrichten.
Ähm, ich war mal so dreist das mal zu probieren. :oops:
Also bei mir funktioniert das - ich vermute also, dass es an deinem Clienteinstellungen liegt.
Code:
b3ll3roph0n@katana ~ % ssh -vv micha@micha.homelinux.org
OpenSSH_4.5p1, OpenSSL 0.9.8d 28 Sep 2006
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to micha.homelinux.org [xxx.xxx.xxx.xxx] port 22.
debug1: Connection established.
...
Wie testest du das ganze denn?
Doch nicht von einem Client hinter dem gleichen Router?
 
OP
Bibaltik

Bibaltik

Member
Bibaltik schrieb:
//edit: Also ich versuche mich im internen Netzwerk über micha.homelinux.org einzuloggen um zu testen ob der Zugang funktioniert. Habe jetzt anders leider keine Möglichkeit das zu testen. Ob dieser Router damit Probleme hat und es auf "normalen" Wege funktioniert?

Wie ich schon geschrieben hatte. ;)

Naja mein alter Router hatte damit keine Probleme auch vom internen Netz das zu testen.
Aber sofern bei dir bei http://micha.homelinux.org die phpinfo Seite kommt bin ich zufrieden und ein Stückchen schlauer. :)
 
Oben