SSH Connection refused

Alle weiteren Dienste, die nicht in die drei oberen Foren gehören.
Antworten
Copa
Beiträge: 55
Registriert: 24.09.2010 19:59:21

SSH Connection refused

Beitrag von Copa » 09.11.2010 21:39:54

Ich kann nicht mehr via SSH verbinden.

IPtabels habe ich bereits gecleared, hat aber nichts geholfen.
Fail2ban war installiert, ist jetzt aber deinstalliert.

Könnt Ihr mir einen Tipp geben, was ich noch versuchen kann?

Code: Alles auswählen

Chain INPUT (policy DROP)
target     prot opt source               destination         
DROP       tcp  --  anywhere             loopback/8          
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED 
ACCEPT     all  --  anywhere             anywhere            
DROP       all  --  BASE-ADDRESS.MCAST.NET/4  anywhere            
PUB_IN     all  --  anywhere             anywhere            
PUB_IN     all  --  anywhere             anywhere            
PUB_IN     all  --  anywhere             anywhere            
PUB_IN     all  --  anywhere             anywhere            
DROP       all  --  anywhere             anywhere            

Chain FORWARD (policy DROP)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED 
DROP       all  --  anywhere             anywhere            

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
PUB_OUT    all  --  anywhere             anywhere            
PUB_OUT    all  --  anywhere             anywhere            
PUB_OUT    all  --  anywhere             anywhere            
PUB_OUT    all  --  anywhere             anywhere            

Chain INT_IN (0 references)
target     prot opt source               destination         
ACCEPT     icmp --  anywhere             anywhere            
DROP       all  --  anywhere             anywhere            

Chain INT_OUT (0 references)
target     prot opt source               destination         
ACCEPT     icmp --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            

Chain PAROLE (11 references)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            

Chain PUB_IN (4 references)
target     prot opt source               destination         
ACCEPT     icmp --  anywhere             anywhere            icmp destination-unreachable 
ACCEPT     icmp --  anywhere             anywhere            icmp echo-reply 
ACCEPT     icmp --  anywhere             anywhere            icmp time-exceeded 
ACCEPT     icmp --  anywhere             anywhere            icmp echo-request 
PAROLE     tcp  --  anywhere             anywhere            tcp dpt:ftp 
PAROLE     tcp  --  anywhere             anywhere            tcp dpt:ssh 
PAROLE     tcp  --  anywhere             anywhere            tcp dpt:smtp 
PAROLE     tcp  --  anywhere             anywhere            tcp dpt:domain 
PAROLE     tcp  --  anywhere             anywhere            tcp dpt:www 
PAROLE     tcp  --  anywhere             anywhere            tcp dpt:pop3 
PAROLE     tcp  --  anywhere             anywhere            tcp dpt:imap2 
PAROLE     tcp  --  anywhere             anywhere            tcp dpt:https 
PAROLE     tcp  --  anywhere             anywhere            tcp dpt:mysql 
PAROLE     tcp  --  anywhere             anywhere            tcp dpt:http-alt 
PAROLE     tcp  --  anywhere             anywhere            tcp dpt:webmin 
ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain 
DROP       icmp --  anywhere             anywhere            
DROP       all  --  anywhere             anywhere            

Chain PUB_OUT (4 references)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere  

Code: Alles auswählen

# Package generated configuration file
# See the sshd(8) manpage for details

# What ports, IPs and protocols we listen for
Port 1378
# 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 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 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
#AllowUsers root
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

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

UsePAM yes

Boity
Beiträge: 799
Registriert: 15.05.2009 13:59:19

Re: SSH Connection refused

Beitrag von Boity » 09.11.2010 23:30:57

Hi !

Führ mal folgendes aus :

Code: Alles auswählen

iptables -F 
iptables -X 

dpkg -l | grep fail
netstat -tulpen | grep ssh
PS : Du weisst,dass dein SSH Port auf dem Port "1378" lauscht ?

Benutzeravatar
Duff
Beiträge: 6321
Registriert: 22.03.2005 14:36:03
Wohnort: /home/duff

Re: SSH Connection refused

Beitrag von Duff » 10.11.2010 08:26:34

Existieren die Dateien /etc/hosts.allow und /etc/hosts.deny?
Dann müsstest du ggf. SSH noch über die Datei /etc/hosts.allow erlauben.
Oh, yeah!

Copa
Beiträge: 55
Registriert: 24.09.2010 19:59:21

Re: SSH Connection refused

Beitrag von Copa » 10.11.2010 14:39:31

iptables -F
iptables -X ist gemacht


dpkg -l | grep fail

Code: Alles auswählen

rc  fail2ban                                                 0.8.3-2sid1                bans IPs that cause multiple authentication 
netstat -tulpen | grep ssh

Code: Alles auswählen

tcp        0      0 0.0.0.0:1378            0.0.0.0:*               LISTEN      0          19274       3964/sshd       
tcp6       0      0 :::1378                 :::*                    LISTEN      0          19272       3964/sshd       
Weder /etc/hosts.deny noch /etc/hosts.allow sind vorhanden.

uname
Beiträge: 12474
Registriert: 03.06.2008 09:33:02

Re: SSH Connection refused

Beitrag von uname » 10.11.2010 15:57:15

Versuche lokal:

Code: Alles auswählen

ssh -v user@localhost -p 1378
Versuche remote:

Code: Alles auswählen

ssh -v user@server -p 1378
Poste die jeweils letzten Zeilen. Schau auch in /var/log/auth.log. Evtl. kannst du dir auch noch /etc/pam.d/ssh anschauen.

Copa
Beiträge: 55
Registriert: 24.09.2010 19:59:21

Re: SSH Connection refused

Beitrag von Copa » 11.11.2010 08:43:37

Also mit den Befehlen kann ich mich sowohl bei localhost als auch bei meiner ServerIP anmelden... Jedoch nicht via PuttY.

Boity
Beiträge: 799
Registriert: 15.05.2009 13:59:19

Re: SSH Connection refused

Beitrag von Boity » 11.11.2010 08:58:25

Eventuell hast du was in Putty selbst verstellt ?

Copa
Beiträge: 55
Registriert: 24.09.2010 19:59:21

Re: SSH Connection refused

Beitrag von Copa » 11.11.2010 09:07:33

Nein, das kann ich definitiv ausschließen.

uname
Beiträge: 12474
Registriert: 03.06.2008 09:33:02

Re: SSH Connection refused

Beitrag von uname » 11.11.2010 09:30:22

Aber bei Putty trägst du auch wirklich den abweichenden Port irgendwo ein? Ist aber definitiv ein Putty-Problem. Versuche sonst alternativ mal "plink.exe" als die textbasierte Putty-Version. Sollte bei Putty dabei sein.

Antworten