blob: b5e64510bbeff89f501b12da1b69d0f83b950c97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
##1. Problems connecting via ssh.##
If an attempt at ssh to a host has been denied, (although previously successful),
you may get the following error:
`ssh_exchange_identification: read: Connection reset by peer`
This can be caused by an number of reasons. You can first try to delete the line containg the
host from your ~/.ssh/known_host file. If this doesn't work then your ip address may be blocked
and could be listed in the /etc/hosts.deny file.
To better diagnose the situation try connecting via ssh with the verbose option (-v or -vv)
as this may provide some clues. A message that the connection has been reset by the peer could be
further indication that the ip address is in the host.deny file.
Therefore check the file /etc/hosts.deny for the ip address. If the ip address is listed,
the following steps should then be followed:
1. Stop the DenyHosts service:
`$ systemctl stop denyhosts`
2. Remove the ip address from the following files:
1. `/etc/hosts.deny`
2. `/var/lib/denyhosts/hosts`
3. `/var/lib/denyhosts/hosts-restricted`
4. `/var/lib/denyhosts/hosts-root`
5. `/var/lib/denyhosts/hosts-valid`
6. `/var/lib/denyhosts/users-hosts`
3. Start the DenyHosts service:
`$ systemctl start denyhosts`
###Refs:###
https://stackoverflow.com/questions/9225300/denyhosts-keeps-adding-back-my-ip
|