PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : SSH Zugriffsproblem



Seiten : [1] 2

L3xx
11.11.05, 18:22
Hi,

habe folgendes Problem:

ich komm von aussen, also über internet nicht per ssh auf meinen rechner.

port forwarding im router ist geschalten(22 müsste dich reichen!?), und der rechner steht testweise sogar in der DMZ.

aus dem LAN heraus funktioniert es ohne probleme. gibts vielleicht ne einstellung in der sshd_config?

marce
12.11.05, 00:50
allg. gesagt - so wie die Infos Deinerseits:

Ja.

L3xx
12.11.05, 14:54
das is die aktuelle cfg.


# $OpenBSD: sshd_config,v 1.65 2003/08/28 12:54:34 markus Exp $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.

#Port 22
#Protocol 2,1
#ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
#obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
#PermitEmptyPasswords no

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCreds yes

# Set this to 'yes' to enable PAM authentication (via challenge-response)
# and session processing. Depending on your PAM configuration, this may
# bypass the setting of 'PasswordAuthentication'
UsePAM yes

#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#KeepAlive yes
#UseLogin no
UsePrivilegeSeparation no
#PermitUserEnvironment no
#Compression yes
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10

# no default banner path
#Banner /some/path

# override default of no subsystems
Subsystem sftp /usr/lib/ssh/sftp-server

carnil
12.11.05, 16:13
Hallo

Also wenn Du vom LAN aus, per ssh korrekt zugreifen kannst ... treten die Probleme auf, wenn Du den Rechner per IP des Routers ansprichtst, hast Du einen "dynamischen DNS" dienst (z.B. bei DynDNS.org)?

Mehr Informationen allgemein, könnten vielleicht etwas besser helfen.

Roughnecks
12.11.05, 16:51
schalt mal die option ein und schau ob es dann geht:

# rhosts authentication should not be used
#RhostsAuthentication no
# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes

Happel
11.12.05, 00:41
habe genau das selbe problem.... Ich kann übers lokale LAN einwandfrei per ssh auf den Server zugreifen aber sobald ich über dyndns gehen will funzts nicht mehr.

Hab beim Router (IPCOP) den port durchgeroutet es kommt aber immer ein connection timeout nach einiger Zeit.

Ich kann den IPCOP per dyndns erreichen - das funzt alles einwandrei. Nur komme ich über dyndns nicht auf den PC.

Distri ist Debian Sarge alles auf dem neuesten Stand hier noch die sshd_config:


# 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 192.168.0.100
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 600
PermitRootLogin yes
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 no to disable s/key passwords
#ChallengeResponseAuthentication yes

# Change to yes to enable tunnelled clear text passwords
PasswordAuthentication no


# To change Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#AFSTokenPassing no
#KerberosTicketCleanup no

# Kerberos TGT Passing does only work with the AFS kaserver
#KerberosTgtPassing yes

X11Forwarding no
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
KeepAlive yes
#UseLogin no

#MaxStartups 10:30:60
#Banner /etc/issue.net

Subsystem sftp /usr/lib/sftp-server

UsePAM yes

marce
11.12.05, 01:53
PasswordAuthentication no
Key hinterlegt?

marder553
11.12.05, 05:53
@marce


# Set this to 'yes' to enable PAM authentication (via challenge-response)
# and session processing. Depending on your PAM configuration, this may
# bypass the setting of 'PasswordAuthentication'
UsePAM yes

^^

LORd'X
11.12.05, 07:51
Hat dein Router evtl. noch eine Firewall?
Bei meinem Router muss ich z.B. den Port bei der Firewall und NAT freigeben...

Happel
11.12.05, 13:05
@LORd'X

Hab beim IPCOP unter Externer Zugang noch den Port eingetragen und siehe da es funtkioniert! Danke für euere Hilfe !!!!

MfG

Happel

Clonex
06.04.06, 13:50
Hallo Habe folgendes prob wenn ich meinen ssh server starten will bekomme ich folgende meldung:

Der SSH Server konnte nicht gestertet werden:

/etc/ssh/sshd_config line 17: bad port number

meine sshd_conf sieht folgender maßen aus:
# $OpenBSD: sshd_config,v 1.70 2004/12/23 23:11:00 djm Exp $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.

Port 22
Protocol 2,1
AddressFamily any
ListenAddress 192.168.0.26
ListenAddress :


# HostKey for protocol version 1
HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
"sshd_config" 121L, 3529C

Danke schonmal

*Clonex*

marce
06.04.06, 13:53
kommt Dir an Zeile 17 nicht irgendwas merkwürdig vor?

Clonex
06.04.06, 14:09
muss da meine addresse mit port rein?

z.B
ListenAddress :192.168.0.26:22

???

mercy für die schnelle hilfe!!

Clonex

Clonex
06.04.06, 14:15
Wenn ich das aber so schreib :
# $OpenBSD: sshd_config,v 1.70 2004/12/23 23:11:00 djm Exp $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.

Port 22
Protocol 2,1
AddressFamily any
ListenAddress 192.168.0.26
ListenAddress :192.168.26:22


steht da noch immer:

SSH Server konnte nicht gestertet werden!

/etc/ssh/sshd_config line 17: bad port number

was jetzt?

Clonex

marce
06.04.06, 14:15
man sshd_config meint dazu

ListenAddress
Specifies the local addresses sshd should listen on. The following forms may be used:

ListenAddress host|IPv4_addr|IPv6_addr
ListenAddress host|IPv4_addr:port
ListenAddress [host|IPv6_addr]:port

If port is not specified, sshd will listen on the address and all prior Port options speciâ
fied. The default is to listen on all local addresses. Multiple ListenAddress options are
permitted. Additionally, any Port options must precede this option for non port qualified
addresses.

Clonex
06.04.06, 14:38
Okay da ich kein IPv6 nutze genügen bei mir zwei Zeilen oder

das sieht dann folgender maßen aus:
# $OpenBSD: sshd_config,v 1.70 2004/12/23 23:11:00 djm Exp $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.

Port 22
Protocol 2,1
AddressFamily any
ListenAddress 192.168.0.26
ListenAddress 192.168.26:22


# HostKey for protocol version 1
HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 1h
ServerKeyBits 768

# Logging
obsoletes QuietMode and FascistLogging
SyslogFacility AUTH
LogLevel INFO

# Authentication:

LoginGraceTime 2m
PermitRootLogin yes
StrictModes yes
MaxAuthTries 6

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys

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

Aber dann bekomme ich folgende meldung:

Der SSH Server konnte nicht gestartet werden:

/etc/ssh/sshd_config: line 31: Bad configuration options: obsoletes
/etc/ssh/sshd_config: terminating, 1 bad configuration options


Thanks

Clonex

marce
06.04.06, 14:45
Lesen kannst Du aber schon? Und Du weisst auch, was Du da machst?

Momentan habe ich das Gefühl, dass die Antwort auf beide Frage "nein" lautet.

Und benutze bitte endlich mal code-Tags.

Clonex
06.04.06, 14:59
Jetz sieht die sshd_config folgender maßen aus:
# $OpenBSD: sshd_config,v 1.70 2004/12/23 23:11:00 djm Exp $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.

Port 22
Protocol 2,1
AddressFamily any
ListenAddress 192.168.0.26
ListenAddress 192.168.26:22


# HostKey for protocol version 1
HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 1h
ServerKeyBits 768

# Logging
obsoletes QuietMode and FascistLogging
SyslogFacility AUTH
LogLevel INFO

# Authentication:

LoginGraceTime 2m
PermitRootLogin yes
StrictModes yes
MaxAuthTries 6

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys

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



Und ich bekomme beim starten folgende meldung:

Der SSH Server konnte nicht gestartet werden:

/etc/ssh/sshd_config: line 31: Bad configuration option: obsoletes
/etc/ssh/sshd_config: terminating, 1 bad configuration options


Danke

Clonex

marce
06.04.06, 15:02
man Erkenntnisresistenz
man PEBKAC



etc/ssh/sshd_config: line 31: Bad configuration option: obsoletes
/etc/ssh/sshd_config: terminating, 1 bad configuration options
... da steht's doch...

Clonex
06.04.06, 15:12
Sry aber ich kann damit leider nix anfangen!!

Wie veraltet??
Was mache ich jetzt?

Clonex
06.04.06, 15:25
wie komme ich auf die zwei man pages??


man Erkenntnisresistenz
man PEBKAC

bzw was kann ich jetztb machen um den ssh zum laufen zu bekommen?


Clonex

klemens
06.04.06, 15:36
In Zeile 17:

ListenAddress :

Tu das einfach weg

Clonex
06.04.06, 15:41
Nein wenn ich erhlich bin bin ich mir nicht sicher wie ich den richtig configurieren soll deshalb bitte ich ja um hilfe!

//Lesen kannst Du aber schon? Und Du weisst auch, was Du da machst?

Ja lesen kann ich, ja das weis ich ansich bis auf ein paar stellen deshalb poste ich ja auch!

//Momentan habe ich das Gefühl, dass die Antwort auf beide Frage "nein" lautet.

da hast du wohl recht!

//Und benutze bitte endlich mal code-Tags.

Was sind bitte code-Tags?

Wie hast du das gemeint mit da stehts ja!!!?
etc/ssh/sshd_config: line 31: Bad configuration option: obsoletes
/etc/ssh/sshd_config: terminating, 1 bad configuration options

was soll ich mit der option obseletes denn bitte machen? Wie veraltet??

please help

Clonex

eule
06.04.06, 15:45
wie komme ich auf die zwei man pages??




man Erkenntnisresistenz

http://de.wikipedia.org/wiki/Erkenntnis
http://de.wikipedia.org/wiki/Resistenz



man PEBKAC


http://de.wikipedia.org/wiki/PEBKAC

Clonex
06.04.06, 15:47
wenn ich die Zeile 17 komplett lösche tut sich nix selbe fehler meldung!!
genauso wie wenn ich sie in kommentar setze!
Wenn nur
ListenAddress :
drin steht
bekomme ich die meldung

ssh server konnte nicht gestartet werden:

/etc/ssh/sshd_config line 17: bad port number

wenn nur der port (also ListenAddress :22) in line 17 steht bekomme ich gesagt

bad addr or host: (Name or service not know)

Danke für die Hilfe aber

Was nun??

Clonex

Clonex
06.04.06, 15:50
Danke für die Links!

Clonex

Clonex
06.04.06, 16:03
In Zeile 17:

ListenAddress :

Tu das einfach weg



Das geht auch koomischerweise nicht hatte ich anfangs mal probiert
:confused:
was nun?

:rolleyes:

klemens
06.04.06, 16:12
Zeile 31 hat noch einen Fehler

etc/ssh/sshd_config: line 31: Bad configuration option: obsoletes

Setz da ein Kommentarzeichen davor (Schaut auch wie ein Kommentar aus)

Clonex
06.04.06, 16:28
Habe ich mir auch gedacht

habe das wieder in kommentar gesetzt und versucht zu starten:

linux:/ # /etc/init.d/sshd start
Starting SSH daemon failed

geht aber leider nicht!
Was mache ich jetzt?

Danke

Clonex

Clonex
07.04.06, 00:41
Hat jemand einen Rat was ich jezt tun soll?

Danke

Clonex