PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : SSH Problem



T0X!C
06.01.04, 15:55
Hi,
ich habe auf einem Debian Woody System den SSH2 Daemon installiert, damit ich ihn von meiner Workstation aus konfigurieren kann.
Das Einloggen funktioniert super, allerdings friert nach einiger Zeit immer die Konsole ein und Tastatureingaben werden nicht mehr angenommen. Ich muss dann erstmal dem SSH2 Daemon neustarten, damit ich wieder connecten kann.



[16:44 Uhr] soenke@debian:~$ ssh 192.168.0.5 -2
ssh: connect to host 192.168.0.5 port 22: No route to host


Das ist mir jetzt schon einige Male passiert, und ich weiß nicht, ob es was mit meiner Firewall oder mit dem SSH Daemon zu tun hat.
(Config kommt gleich, muss nur eben den Bildschirm umstecken und neustarten :mad: )

Edit: So die Configs:

Firewall:



[17:07 Uhr] soenke@debian:~$ cat iptables.conf
#!/bin/bash

modprobe ip_conntrack
modprobe ip_conntrack_ftp

iptables -P INPUT DROP
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT

# FTP
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT

# SSH
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT

# WWW
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
[17:08 Uhr] soenke@debian:~$


SSH:



[17:08 Uhr] soenke@debian:~$ cat sshd2_config
# sshd2_config
# SSH 2.0 Server Configuration File

*:
Port 22
ListenAddress 192.168.0.5
Ciphers AnyStd
# Ciphers AnyCipher
# Ciphers AnyStdCipher
# Ciphers 3des
IdentityFile identification
AuthorizationFile authorization
HostKeyFile hostkey
PublicHostKeyFile hostkey.pub
RandomSeedFile random_seed
ForwardAgent yes
ForwardX11 yes
# DEPRECATED PasswordAuthentication yes
PasswordGuesses 3
# 0 == number of connections not limited
MaxConnections 0
# PermitRootLogin nopwd
PermitRootLogin yes
PermitEmptyPasswords no
# DEPRECATED PubkeyAuthentication yes
# AllowedAuthentications publickey,password,hostbased
AllowedAuthentications publickey,password
# RequiredAuthentications publickey,password
ForcePTTYAllocation no
VerboseMode no
PrintMotd yes
CheckMail yes
UserConfigDirectory "%D/.ssh2"
# UserConfigDirectory "/etc/ssh2/auth/%U"
SyslogFacility AUTH
# SyslogFacility LOCAL7
Ssh1Compatibility yes
Sshd1Path /usr/sbin/sshd1
AllowHosts localhost, 192.168.0.4, 192.168.0.5
# DenyHosts evil.org, aol.com
# AllowSHosts trusted.host.org
# DenySHosts not.quite.trusted.org
NoDelay yes

KeepAlive yes
RequireReverseMapping yes
UserKnownHosts yes

# subsystem definitions

subsystem-sftp sftp-server
[17:08 Uhr] soenke@debian:~$

filou
06.01.04, 22:09
Hallo,

lass doch mal etherreal auf dem 192.168.0.5 mitlaufen während du versuchst eine Verbindung aufzubauen.

Hast du denn ne default policy für die OUTPUT chain, oder ist dort alles erlaubt ?

Evtl fehlt ja dann sowas:

Keine Garantie:

iptables -A OUTPUT -o $interface -d 192.168.0.0/255.255.255.0 -p TCP --dport 1024:65535
--sport ssh -m state --state ESTABLISHED,RELATED -j ACCEPT

just a try

mfg

T0X!C
07.01.04, 12:39
Danke, aber ich glaube ich habe mein Problem grad gelöst ... evtl. lags am APM des Mainboards. Ich muss jetzt mal testen, ob das Problem noch weiter auftaucht, werd mal sehn.