How to solve 'Connection refused' errors in SSH connection?
I have an Ubuntu Server 10.10 32-bit in my home. I'm making SSH connections to it from my PC via Putty.
The problem is, sometimes I'm able to login seamlessly. However, sometimes it gives me an error like this: Network error: Connection refused.
Then, I dont't change anything, try to login a few times more, wait a while and try again. Sometimes I can log in, sometimes I cannot. It seems pretty random to me.
What can I do to solve this?
Edit:
And Sometimes, Putty gives Network error: Software caused connection abort
error after displaying login as:
text.
Here is the ping -t output:
Pinging 192.168.2.254 with 32 bytes of data:
Reply from 192.168.2.254: bytes=32 time=6ms TTL=64
Reply from 192.168.2.254: bytes=32 time=65ms TTL=6
Reply from 192.168.2.254: bytes=32 time=88ms TTL=6
Reply from 192.168.2.254: bytes=32 time=1ms TTL=64
Reply from 192.168.2.254: bytes=32 time=3ms TTL=64
Reply from 192.168.2.254: bytes=32 time=1ms TTL=64
Reply from 192.168.2.254: bytes=32 time=1ms TTL=64
Reply from 192.168.2.254: bytes=32 time=1ms TTL=64
Reply from 192.168.2.254: bytes=32 time=1ms TTL=64
I turned off firewall of router, and everything seems to work now. Except for that, I still can't enter my web server by typing external IP from my PC.
ssh openssh
add a comment |
I have an Ubuntu Server 10.10 32-bit in my home. I'm making SSH connections to it from my PC via Putty.
The problem is, sometimes I'm able to login seamlessly. However, sometimes it gives me an error like this: Network error: Connection refused.
Then, I dont't change anything, try to login a few times more, wait a while and try again. Sometimes I can log in, sometimes I cannot. It seems pretty random to me.
What can I do to solve this?
Edit:
And Sometimes, Putty gives Network error: Software caused connection abort
error after displaying login as:
text.
Here is the ping -t output:
Pinging 192.168.2.254 with 32 bytes of data:
Reply from 192.168.2.254: bytes=32 time=6ms TTL=64
Reply from 192.168.2.254: bytes=32 time=65ms TTL=6
Reply from 192.168.2.254: bytes=32 time=88ms TTL=6
Reply from 192.168.2.254: bytes=32 time=1ms TTL=64
Reply from 192.168.2.254: bytes=32 time=3ms TTL=64
Reply from 192.168.2.254: bytes=32 time=1ms TTL=64
Reply from 192.168.2.254: bytes=32 time=1ms TTL=64
Reply from 192.168.2.254: bytes=32 time=1ms TTL=64
Reply from 192.168.2.254: bytes=32 time=1ms TTL=64
I turned off firewall of router, and everything seems to work now. Except for that, I still can't enter my web server by typing external IP from my PC.
ssh openssh
next time it craps out like that; run a ping on it again, does it still work? how many people ssh to this machine?
– myusuf3
Mar 13 '11 at 4:33
Only I ssh this server.
– frbry
Mar 13 '11 at 12:03
Exactly the same problem here, also getting a mix of successful connects (which then work for hours), 'connection refused' and 'software caused connection abort' after the login or password entry. To provide some additional details: in my case it's a 64-bit virtual machine (running Ubuntu Server 10.10) on a Microsoft Hyper-V host, using the "old network card" emulation.
– hheimbuerger
Mar 31 '11 at 12:24
SSH is installed on your server?
– Willian Soares
Jan 8 '14 at 18:27
add a comment |
I have an Ubuntu Server 10.10 32-bit in my home. I'm making SSH connections to it from my PC via Putty.
The problem is, sometimes I'm able to login seamlessly. However, sometimes it gives me an error like this: Network error: Connection refused.
Then, I dont't change anything, try to login a few times more, wait a while and try again. Sometimes I can log in, sometimes I cannot. It seems pretty random to me.
What can I do to solve this?
Edit:
And Sometimes, Putty gives Network error: Software caused connection abort
error after displaying login as:
text.
Here is the ping -t output:
Pinging 192.168.2.254 with 32 bytes of data:
Reply from 192.168.2.254: bytes=32 time=6ms TTL=64
Reply from 192.168.2.254: bytes=32 time=65ms TTL=6
Reply from 192.168.2.254: bytes=32 time=88ms TTL=6
Reply from 192.168.2.254: bytes=32 time=1ms TTL=64
Reply from 192.168.2.254: bytes=32 time=3ms TTL=64
Reply from 192.168.2.254: bytes=32 time=1ms TTL=64
Reply from 192.168.2.254: bytes=32 time=1ms TTL=64
Reply from 192.168.2.254: bytes=32 time=1ms TTL=64
Reply from 192.168.2.254: bytes=32 time=1ms TTL=64
I turned off firewall of router, and everything seems to work now. Except for that, I still can't enter my web server by typing external IP from my PC.
ssh openssh
I have an Ubuntu Server 10.10 32-bit in my home. I'm making SSH connections to it from my PC via Putty.
The problem is, sometimes I'm able to login seamlessly. However, sometimes it gives me an error like this: Network error: Connection refused.
Then, I dont't change anything, try to login a few times more, wait a while and try again. Sometimes I can log in, sometimes I cannot. It seems pretty random to me.
What can I do to solve this?
Edit:
And Sometimes, Putty gives Network error: Software caused connection abort
error after displaying login as:
text.
Here is the ping -t output:
Pinging 192.168.2.254 with 32 bytes of data:
Reply from 192.168.2.254: bytes=32 time=6ms TTL=64
Reply from 192.168.2.254: bytes=32 time=65ms TTL=6
Reply from 192.168.2.254: bytes=32 time=88ms TTL=6
Reply from 192.168.2.254: bytes=32 time=1ms TTL=64
Reply from 192.168.2.254: bytes=32 time=3ms TTL=64
Reply from 192.168.2.254: bytes=32 time=1ms TTL=64
Reply from 192.168.2.254: bytes=32 time=1ms TTL=64
Reply from 192.168.2.254: bytes=32 time=1ms TTL=64
Reply from 192.168.2.254: bytes=32 time=1ms TTL=64
I turned off firewall of router, and everything seems to work now. Except for that, I still can't enter my web server by typing external IP from my PC.
ssh openssh
ssh openssh
edited Dec 17 '13 at 18:31
Braiam
52.4k20138223
52.4k20138223
asked Mar 12 '11 at 18:07
frbryfrbry
561155
561155
next time it craps out like that; run a ping on it again, does it still work? how many people ssh to this machine?
– myusuf3
Mar 13 '11 at 4:33
Only I ssh this server.
– frbry
Mar 13 '11 at 12:03
Exactly the same problem here, also getting a mix of successful connects (which then work for hours), 'connection refused' and 'software caused connection abort' after the login or password entry. To provide some additional details: in my case it's a 64-bit virtual machine (running Ubuntu Server 10.10) on a Microsoft Hyper-V host, using the "old network card" emulation.
– hheimbuerger
Mar 31 '11 at 12:24
SSH is installed on your server?
– Willian Soares
Jan 8 '14 at 18:27
add a comment |
next time it craps out like that; run a ping on it again, does it still work? how many people ssh to this machine?
– myusuf3
Mar 13 '11 at 4:33
Only I ssh this server.
– frbry
Mar 13 '11 at 12:03
Exactly the same problem here, also getting a mix of successful connects (which then work for hours), 'connection refused' and 'software caused connection abort' after the login or password entry. To provide some additional details: in my case it's a 64-bit virtual machine (running Ubuntu Server 10.10) on a Microsoft Hyper-V host, using the "old network card" emulation.
– hheimbuerger
Mar 31 '11 at 12:24
SSH is installed on your server?
– Willian Soares
Jan 8 '14 at 18:27
next time it craps out like that; run a ping on it again, does it still work? how many people ssh to this machine?
– myusuf3
Mar 13 '11 at 4:33
next time it craps out like that; run a ping on it again, does it still work? how many people ssh to this machine?
– myusuf3
Mar 13 '11 at 4:33
Only I ssh this server.
– frbry
Mar 13 '11 at 12:03
Only I ssh this server.
– frbry
Mar 13 '11 at 12:03
Exactly the same problem here, also getting a mix of successful connects (which then work for hours), 'connection refused' and 'software caused connection abort' after the login or password entry. To provide some additional details: in my case it's a 64-bit virtual machine (running Ubuntu Server 10.10) on a Microsoft Hyper-V host, using the "old network card" emulation.
– hheimbuerger
Mar 31 '11 at 12:24
Exactly the same problem here, also getting a mix of successful connects (which then work for hours), 'connection refused' and 'software caused connection abort' after the login or password entry. To provide some additional details: in my case it's a 64-bit virtual machine (running Ubuntu Server 10.10) on a Microsoft Hyper-V host, using the "old network card" emulation.
– hheimbuerger
Mar 31 '11 at 12:24
SSH is installed on your server?
– Willian Soares
Jan 8 '14 at 18:27
SSH is installed on your server?
– Willian Soares
Jan 8 '14 at 18:27
add a comment |
12 Answers
12
active
oldest
votes
You must install openssh-server on Linux before this will work. Get the internal IP address of Ubuntu and use that IP to setup port forwarding on port 22 (SSH) section of your router. Although if you don't intend to SSH from outside your network, this is not required.
Here's how to install openssh-server:
sudo apt-get install openssh-server openssh-client
[ENTER PASSWORD]
10
Does not answer the question directly but this is useful as Ubuntu does not come pre-installed with SSH server.
– ostati
Dec 30 '15 at 17:50
I recently got a new laptop and totally forgot it's not installed by default =D
– Izkata
Apr 5 '16 at 14:31
add a comment |
IP address conflict turned out to be the root cause when I was seeing this SSH error message.
After reading the answers above I suspected an IP address conflict, but needed to prove that address conflict was or was not the problem.
This great article showed how to use arp-scan to see if two pieces of hardware were claiming the same IP address.
In my case the server machine had a static ip address of 192.168.1.42, I used arp-scan to check that address:
$ sudo apt-get install arp-scan
$ arp-scan -I eth0 -l | grep 192.168.1.42
192.168.1.42 d4:eb:9a:f2:11:a1 (Unknown)
192.168.1.42 f4:23:a4:38:b5:76 (Unknown) (DUP: 2)
Sure enough there was a conflict, as shown above. Then I ran arp-scan without the grep, found that .43 was available, went and edited /etc/network/interfaces
and changed the static ip from .42 to .43
Actually running that command showed only one line on my box, except that the name was that of another device.
– assylias
Jul 25 '12 at 23:26
Thank you so much for the point in the right direction about IP address conflict. Had a similar problem! +1
– DominikAngerer
Jan 10 '15 at 2:47
Just saved me so much time... kudos...
– Chris Barlow
Jul 8 '15 at 19:31
Sometimes my router just needs to be restarted to solve this issue.
– Gabriel Staples
Sep 11 '16 at 22:47
add a comment |
Use arping
on the IP address that is having connection issues. That will show the MAC address for each ping reply, and hopefully will unmask the rogue MAC address.
arping 192.168.2.254
You should check the DHCP IP address pool on the DHCP server, make sure no devices have static IPs that collide with the DHCP pool.
These clues point to duplicate IP:
- ping ttl and round trip time looks like 2 distinct servers
- intermittent disconnects without rebooting
Excellent, pointed me right at the correct path! Was able to trace it by the second MAC address to which port it was, and change the printer's IP
– Canadian Luke
Sep 15 '16 at 20:59
1
I needed to add -I wlan0 (wlan0 being my wifi device)
– pl-94
Jan 15 '18 at 14:32
add a comment |
I had the same problem, even though I had a static IP address. Turns out another server on my network had been assigned the same (static) IP address. (Duh.) So it does appear that the problem is caused by IP address conflicts, but there may be various possible ways they can happen. If you set yours to static and still have a problem, try shutting down your machine and pinging the address. If you get any replies, start looking for what else could have the same address.
1
I experienced the same symptoms and tracked it down to a machine with the same IP address as the server.
– SabreWolfy
Dec 7 '11 at 15:05
add a comment |
What do you get if you do this?
grep 192.168.2.25 /etc/hosts.deny
If that returns anything then you need to remove it.
10
That's one of the infamous "useless uses ofcat
" - you can simplygrep 192.168.2.25 /etc/hosts.deny
– Tobias Kienzler
Feb 26 '14 at 8:19
@TobiasKienzler Fixed it
– wjandrea
May 23 '17 at 20:09
add a comment |
open the file of ssh config:
sudo nano /etc/ssh/ssh_config
find the port
#port 22
remove sharp the port option
then save the file by ctrl + x and restart your service
sudo service ssh restart
add a comment |
This looks more of a problem of your network equipment than the server itself.
Check /var/log/messages for ethernet link up/downs (or wlan in case of wireless). If so try changing the cables.
Yes, i tried and succeeded in making an ssh connection from outside of my network (which my server and my PC are located in). It seems working well. My server is also a web server. When I try to connect over port 80 from my PC, i see my ADSL modem's login page. But when I try the same thing from another computer which is outside my network, I see Apache's It Works page.
– frbry
Mar 12 '11 at 19:08
What is you PC ip, your server ip and your internal adsl router ip?
– forcefsck
Mar 12 '11 at 19:22
PC: 192.168.2.2 (Received from DHCP) Server: 192.168.2.254 (Static, out of DHCP range) ADSL Router: 192.168.2.1
– frbry
Mar 12 '11 at 19:24
I'm a bit confused, when you connect from 192.168.2.2 to 192.168.2.254 port 80 you get the adsl modem's login?
– forcefsck
Mar 12 '11 at 19:54
1
Unless you have setup some kind of web proxy to your server, then clearly your adsl modem is responding to requests made to 192.168.2.254 and probably that's the case when you get theConnection refused
error with ssh. So you have to recheck the settings of your adsl modem.
– forcefsck
Mar 12 '11 at 20:27
|
show 1 more comment
I can confirm this exact issue: It's not a simple connectivity issue. The ethernet link does not change state; server is reachable via ping; ssh connects flawlessly occasionally, then seemingly randomly does not connect or existing ssh session drops. This occurs on Ubuntu 10.04 and 11.04. Following hheimbuerger's suggestion I gave the server a static IP, this seemed to fix it.
Workaround: Change adapter from DHCP to static.
add a comment |
I had exactly the same issue, and in my case it turned out to be an IP address conflict. My Ubuntu VM had a dynamic address, but another machine (in this case a phone) had a static IP assigned that the DHCP server did not know about.
Just changing the IP that was assigned by the DHCP server to the Ubuntu VM fixed all connection issues.
add a comment |
It's basically because of any one of the following reasons:
- Too many users on the network trying to access the server
- More than one computer on the network has the same IP as the server causing an IP conflict
- Wrong username or your credentials have been revoked
add a comment |
You might want to check your iptables
rules on your server. It sounds like you've a rule for limiting new SSH connections.
The next rule allows 5 new connections per minute, if you exceed this limit, your new connections will be rejected after some time has passed:
-A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW -m limit --limit 5/min -j ACCEPT
See the IPTables / Netfilter documentation, scroll a bit till limit
.
add a comment |
arp-scan is showing two duplicate devices, but when I run Advanced IP scanner on Win8 they all look fine. So they don't always agree.
I set the router to revoke all the leases by telling it to give only 1-hour leases. Will give it time to see if it clears up.
add a comment |
protected by Community♦ Jan 8 '14 at 18:47
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
12 Answers
12
active
oldest
votes
12 Answers
12
active
oldest
votes
active
oldest
votes
active
oldest
votes
You must install openssh-server on Linux before this will work. Get the internal IP address of Ubuntu and use that IP to setup port forwarding on port 22 (SSH) section of your router. Although if you don't intend to SSH from outside your network, this is not required.
Here's how to install openssh-server:
sudo apt-get install openssh-server openssh-client
[ENTER PASSWORD]
10
Does not answer the question directly but this is useful as Ubuntu does not come pre-installed with SSH server.
– ostati
Dec 30 '15 at 17:50
I recently got a new laptop and totally forgot it's not installed by default =D
– Izkata
Apr 5 '16 at 14:31
add a comment |
You must install openssh-server on Linux before this will work. Get the internal IP address of Ubuntu and use that IP to setup port forwarding on port 22 (SSH) section of your router. Although if you don't intend to SSH from outside your network, this is not required.
Here's how to install openssh-server:
sudo apt-get install openssh-server openssh-client
[ENTER PASSWORD]
10
Does not answer the question directly but this is useful as Ubuntu does not come pre-installed with SSH server.
– ostati
Dec 30 '15 at 17:50
I recently got a new laptop and totally forgot it's not installed by default =D
– Izkata
Apr 5 '16 at 14:31
add a comment |
You must install openssh-server on Linux before this will work. Get the internal IP address of Ubuntu and use that IP to setup port forwarding on port 22 (SSH) section of your router. Although if you don't intend to SSH from outside your network, this is not required.
Here's how to install openssh-server:
sudo apt-get install openssh-server openssh-client
[ENTER PASSWORD]
You must install openssh-server on Linux before this will work. Get the internal IP address of Ubuntu and use that IP to setup port forwarding on port 22 (SSH) section of your router. Although if you don't intend to SSH from outside your network, this is not required.
Here's how to install openssh-server:
sudo apt-get install openssh-server openssh-client
[ENTER PASSWORD]
edited Apr 24 '12 at 22:16
htorque
47.6k32175213
47.6k32175213
answered Apr 20 '12 at 20:55
MacGyverMacGyver
898612
898612
10
Does not answer the question directly but this is useful as Ubuntu does not come pre-installed with SSH server.
– ostati
Dec 30 '15 at 17:50
I recently got a new laptop and totally forgot it's not installed by default =D
– Izkata
Apr 5 '16 at 14:31
add a comment |
10
Does not answer the question directly but this is useful as Ubuntu does not come pre-installed with SSH server.
– ostati
Dec 30 '15 at 17:50
I recently got a new laptop and totally forgot it's not installed by default =D
– Izkata
Apr 5 '16 at 14:31
10
10
Does not answer the question directly but this is useful as Ubuntu does not come pre-installed with SSH server.
– ostati
Dec 30 '15 at 17:50
Does not answer the question directly but this is useful as Ubuntu does not come pre-installed with SSH server.
– ostati
Dec 30 '15 at 17:50
I recently got a new laptop and totally forgot it's not installed by default =D
– Izkata
Apr 5 '16 at 14:31
I recently got a new laptop and totally forgot it's not installed by default =D
– Izkata
Apr 5 '16 at 14:31
add a comment |
IP address conflict turned out to be the root cause when I was seeing this SSH error message.
After reading the answers above I suspected an IP address conflict, but needed to prove that address conflict was or was not the problem.
This great article showed how to use arp-scan to see if two pieces of hardware were claiming the same IP address.
In my case the server machine had a static ip address of 192.168.1.42, I used arp-scan to check that address:
$ sudo apt-get install arp-scan
$ arp-scan -I eth0 -l | grep 192.168.1.42
192.168.1.42 d4:eb:9a:f2:11:a1 (Unknown)
192.168.1.42 f4:23:a4:38:b5:76 (Unknown) (DUP: 2)
Sure enough there was a conflict, as shown above. Then I ran arp-scan without the grep, found that .43 was available, went and edited /etc/network/interfaces
and changed the static ip from .42 to .43
Actually running that command showed only one line on my box, except that the name was that of another device.
– assylias
Jul 25 '12 at 23:26
Thank you so much for the point in the right direction about IP address conflict. Had a similar problem! +1
– DominikAngerer
Jan 10 '15 at 2:47
Just saved me so much time... kudos...
– Chris Barlow
Jul 8 '15 at 19:31
Sometimes my router just needs to be restarted to solve this issue.
– Gabriel Staples
Sep 11 '16 at 22:47
add a comment |
IP address conflict turned out to be the root cause when I was seeing this SSH error message.
After reading the answers above I suspected an IP address conflict, but needed to prove that address conflict was or was not the problem.
This great article showed how to use arp-scan to see if two pieces of hardware were claiming the same IP address.
In my case the server machine had a static ip address of 192.168.1.42, I used arp-scan to check that address:
$ sudo apt-get install arp-scan
$ arp-scan -I eth0 -l | grep 192.168.1.42
192.168.1.42 d4:eb:9a:f2:11:a1 (Unknown)
192.168.1.42 f4:23:a4:38:b5:76 (Unknown) (DUP: 2)
Sure enough there was a conflict, as shown above. Then I ran arp-scan without the grep, found that .43 was available, went and edited /etc/network/interfaces
and changed the static ip from .42 to .43
Actually running that command showed only one line on my box, except that the name was that of another device.
– assylias
Jul 25 '12 at 23:26
Thank you so much for the point in the right direction about IP address conflict. Had a similar problem! +1
– DominikAngerer
Jan 10 '15 at 2:47
Just saved me so much time... kudos...
– Chris Barlow
Jul 8 '15 at 19:31
Sometimes my router just needs to be restarted to solve this issue.
– Gabriel Staples
Sep 11 '16 at 22:47
add a comment |
IP address conflict turned out to be the root cause when I was seeing this SSH error message.
After reading the answers above I suspected an IP address conflict, but needed to prove that address conflict was or was not the problem.
This great article showed how to use arp-scan to see if two pieces of hardware were claiming the same IP address.
In my case the server machine had a static ip address of 192.168.1.42, I used arp-scan to check that address:
$ sudo apt-get install arp-scan
$ arp-scan -I eth0 -l | grep 192.168.1.42
192.168.1.42 d4:eb:9a:f2:11:a1 (Unknown)
192.168.1.42 f4:23:a4:38:b5:76 (Unknown) (DUP: 2)
Sure enough there was a conflict, as shown above. Then I ran arp-scan without the grep, found that .43 was available, went and edited /etc/network/interfaces
and changed the static ip from .42 to .43
IP address conflict turned out to be the root cause when I was seeing this SSH error message.
After reading the answers above I suspected an IP address conflict, but needed to prove that address conflict was or was not the problem.
This great article showed how to use arp-scan to see if two pieces of hardware were claiming the same IP address.
In my case the server machine had a static ip address of 192.168.1.42, I used arp-scan to check that address:
$ sudo apt-get install arp-scan
$ arp-scan -I eth0 -l | grep 192.168.1.42
192.168.1.42 d4:eb:9a:f2:11:a1 (Unknown)
192.168.1.42 f4:23:a4:38:b5:76 (Unknown) (DUP: 2)
Sure enough there was a conflict, as shown above. Then I ran arp-scan without the grep, found that .43 was available, went and edited /etc/network/interfaces
and changed the static ip from .42 to .43
answered May 23 '12 at 23:23
Rian SandersonRian Sanderson
49155
49155
Actually running that command showed only one line on my box, except that the name was that of another device.
– assylias
Jul 25 '12 at 23:26
Thank you so much for the point in the right direction about IP address conflict. Had a similar problem! +1
– DominikAngerer
Jan 10 '15 at 2:47
Just saved me so much time... kudos...
– Chris Barlow
Jul 8 '15 at 19:31
Sometimes my router just needs to be restarted to solve this issue.
– Gabriel Staples
Sep 11 '16 at 22:47
add a comment |
Actually running that command showed only one line on my box, except that the name was that of another device.
– assylias
Jul 25 '12 at 23:26
Thank you so much for the point in the right direction about IP address conflict. Had a similar problem! +1
– DominikAngerer
Jan 10 '15 at 2:47
Just saved me so much time... kudos...
– Chris Barlow
Jul 8 '15 at 19:31
Sometimes my router just needs to be restarted to solve this issue.
– Gabriel Staples
Sep 11 '16 at 22:47
Actually running that command showed only one line on my box, except that the name was that of another device.
– assylias
Jul 25 '12 at 23:26
Actually running that command showed only one line on my box, except that the name was that of another device.
– assylias
Jul 25 '12 at 23:26
Thank you so much for the point in the right direction about IP address conflict. Had a similar problem! +1
– DominikAngerer
Jan 10 '15 at 2:47
Thank you so much for the point in the right direction about IP address conflict. Had a similar problem! +1
– DominikAngerer
Jan 10 '15 at 2:47
Just saved me so much time... kudos...
– Chris Barlow
Jul 8 '15 at 19:31
Just saved me so much time... kudos...
– Chris Barlow
Jul 8 '15 at 19:31
Sometimes my router just needs to be restarted to solve this issue.
– Gabriel Staples
Sep 11 '16 at 22:47
Sometimes my router just needs to be restarted to solve this issue.
– Gabriel Staples
Sep 11 '16 at 22:47
add a comment |
Use arping
on the IP address that is having connection issues. That will show the MAC address for each ping reply, and hopefully will unmask the rogue MAC address.
arping 192.168.2.254
You should check the DHCP IP address pool on the DHCP server, make sure no devices have static IPs that collide with the DHCP pool.
These clues point to duplicate IP:
- ping ttl and round trip time looks like 2 distinct servers
- intermittent disconnects without rebooting
Excellent, pointed me right at the correct path! Was able to trace it by the second MAC address to which port it was, and change the printer's IP
– Canadian Luke
Sep 15 '16 at 20:59
1
I needed to add -I wlan0 (wlan0 being my wifi device)
– pl-94
Jan 15 '18 at 14:32
add a comment |
Use arping
on the IP address that is having connection issues. That will show the MAC address for each ping reply, and hopefully will unmask the rogue MAC address.
arping 192.168.2.254
You should check the DHCP IP address pool on the DHCP server, make sure no devices have static IPs that collide with the DHCP pool.
These clues point to duplicate IP:
- ping ttl and round trip time looks like 2 distinct servers
- intermittent disconnects without rebooting
Excellent, pointed me right at the correct path! Was able to trace it by the second MAC address to which port it was, and change the printer's IP
– Canadian Luke
Sep 15 '16 at 20:59
1
I needed to add -I wlan0 (wlan0 being my wifi device)
– pl-94
Jan 15 '18 at 14:32
add a comment |
Use arping
on the IP address that is having connection issues. That will show the MAC address for each ping reply, and hopefully will unmask the rogue MAC address.
arping 192.168.2.254
You should check the DHCP IP address pool on the DHCP server, make sure no devices have static IPs that collide with the DHCP pool.
These clues point to duplicate IP:
- ping ttl and round trip time looks like 2 distinct servers
- intermittent disconnects without rebooting
Use arping
on the IP address that is having connection issues. That will show the MAC address for each ping reply, and hopefully will unmask the rogue MAC address.
arping 192.168.2.254
You should check the DHCP IP address pool on the DHCP server, make sure no devices have static IPs that collide with the DHCP pool.
These clues point to duplicate IP:
- ping ttl and round trip time looks like 2 distinct servers
- intermittent disconnects without rebooting
edited Aug 17 '12 at 23:07
Eliah Kagan
82.8k22228369
82.8k22228369
answered Aug 17 '12 at 21:30
John ShalamskasJohn Shalamskas
12113
12113
Excellent, pointed me right at the correct path! Was able to trace it by the second MAC address to which port it was, and change the printer's IP
– Canadian Luke
Sep 15 '16 at 20:59
1
I needed to add -I wlan0 (wlan0 being my wifi device)
– pl-94
Jan 15 '18 at 14:32
add a comment |
Excellent, pointed me right at the correct path! Was able to trace it by the second MAC address to which port it was, and change the printer's IP
– Canadian Luke
Sep 15 '16 at 20:59
1
I needed to add -I wlan0 (wlan0 being my wifi device)
– pl-94
Jan 15 '18 at 14:32
Excellent, pointed me right at the correct path! Was able to trace it by the second MAC address to which port it was, and change the printer's IP
– Canadian Luke
Sep 15 '16 at 20:59
Excellent, pointed me right at the correct path! Was able to trace it by the second MAC address to which port it was, and change the printer's IP
– Canadian Luke
Sep 15 '16 at 20:59
1
1
I needed to add -I wlan0 (wlan0 being my wifi device)
– pl-94
Jan 15 '18 at 14:32
I needed to add -I wlan0 (wlan0 being my wifi device)
– pl-94
Jan 15 '18 at 14:32
add a comment |
I had the same problem, even though I had a static IP address. Turns out another server on my network had been assigned the same (static) IP address. (Duh.) So it does appear that the problem is caused by IP address conflicts, but there may be various possible ways they can happen. If you set yours to static and still have a problem, try shutting down your machine and pinging the address. If you get any replies, start looking for what else could have the same address.
1
I experienced the same symptoms and tracked it down to a machine with the same IP address as the server.
– SabreWolfy
Dec 7 '11 at 15:05
add a comment |
I had the same problem, even though I had a static IP address. Turns out another server on my network had been assigned the same (static) IP address. (Duh.) So it does appear that the problem is caused by IP address conflicts, but there may be various possible ways they can happen. If you set yours to static and still have a problem, try shutting down your machine and pinging the address. If you get any replies, start looking for what else could have the same address.
1
I experienced the same symptoms and tracked it down to a machine with the same IP address as the server.
– SabreWolfy
Dec 7 '11 at 15:05
add a comment |
I had the same problem, even though I had a static IP address. Turns out another server on my network had been assigned the same (static) IP address. (Duh.) So it does appear that the problem is caused by IP address conflicts, but there may be various possible ways they can happen. If you set yours to static and still have a problem, try shutting down your machine and pinging the address. If you get any replies, start looking for what else could have the same address.
I had the same problem, even though I had a static IP address. Turns out another server on my network had been assigned the same (static) IP address. (Duh.) So it does appear that the problem is caused by IP address conflicts, but there may be various possible ways they can happen. If you set yours to static and still have a problem, try shutting down your machine and pinging the address. If you get any replies, start looking for what else could have the same address.
answered Aug 11 '11 at 15:17
DLoscDLosc
17116
17116
1
I experienced the same symptoms and tracked it down to a machine with the same IP address as the server.
– SabreWolfy
Dec 7 '11 at 15:05
add a comment |
1
I experienced the same symptoms and tracked it down to a machine with the same IP address as the server.
– SabreWolfy
Dec 7 '11 at 15:05
1
1
I experienced the same symptoms and tracked it down to a machine with the same IP address as the server.
– SabreWolfy
Dec 7 '11 at 15:05
I experienced the same symptoms and tracked it down to a machine with the same IP address as the server.
– SabreWolfy
Dec 7 '11 at 15:05
add a comment |
What do you get if you do this?
grep 192.168.2.25 /etc/hosts.deny
If that returns anything then you need to remove it.
10
That's one of the infamous "useless uses ofcat
" - you can simplygrep 192.168.2.25 /etc/hosts.deny
– Tobias Kienzler
Feb 26 '14 at 8:19
@TobiasKienzler Fixed it
– wjandrea
May 23 '17 at 20:09
add a comment |
What do you get if you do this?
grep 192.168.2.25 /etc/hosts.deny
If that returns anything then you need to remove it.
10
That's one of the infamous "useless uses ofcat
" - you can simplygrep 192.168.2.25 /etc/hosts.deny
– Tobias Kienzler
Feb 26 '14 at 8:19
@TobiasKienzler Fixed it
– wjandrea
May 23 '17 at 20:09
add a comment |
What do you get if you do this?
grep 192.168.2.25 /etc/hosts.deny
If that returns anything then you need to remove it.
What do you get if you do this?
grep 192.168.2.25 /etc/hosts.deny
If that returns anything then you need to remove it.
edited May 23 '17 at 20:09
wjandrea
9,35842664
9,35842664
answered Mar 2 '13 at 11:27
Jodi MIddletonJodi MIddleton
411
411
10
That's one of the infamous "useless uses ofcat
" - you can simplygrep 192.168.2.25 /etc/hosts.deny
– Tobias Kienzler
Feb 26 '14 at 8:19
@TobiasKienzler Fixed it
– wjandrea
May 23 '17 at 20:09
add a comment |
10
That's one of the infamous "useless uses ofcat
" - you can simplygrep 192.168.2.25 /etc/hosts.deny
– Tobias Kienzler
Feb 26 '14 at 8:19
@TobiasKienzler Fixed it
– wjandrea
May 23 '17 at 20:09
10
10
That's one of the infamous "useless uses of
cat
" - you can simply grep 192.168.2.25 /etc/hosts.deny
– Tobias Kienzler
Feb 26 '14 at 8:19
That's one of the infamous "useless uses of
cat
" - you can simply grep 192.168.2.25 /etc/hosts.deny
– Tobias Kienzler
Feb 26 '14 at 8:19
@TobiasKienzler Fixed it
– wjandrea
May 23 '17 at 20:09
@TobiasKienzler Fixed it
– wjandrea
May 23 '17 at 20:09
add a comment |
open the file of ssh config:
sudo nano /etc/ssh/ssh_config
find the port
#port 22
remove sharp the port option
then save the file by ctrl + x and restart your service
sudo service ssh restart
add a comment |
open the file of ssh config:
sudo nano /etc/ssh/ssh_config
find the port
#port 22
remove sharp the port option
then save the file by ctrl + x and restart your service
sudo service ssh restart
add a comment |
open the file of ssh config:
sudo nano /etc/ssh/ssh_config
find the port
#port 22
remove sharp the port option
then save the file by ctrl + x and restart your service
sudo service ssh restart
open the file of ssh config:
sudo nano /etc/ssh/ssh_config
find the port
#port 22
remove sharp the port option
then save the file by ctrl + x and restart your service
sudo service ssh restart
edited Mar 13 at 18:12
Divyanshu Srivastava
335
335
answered Apr 17 '17 at 19:40
AminAmin
56118
56118
add a comment |
add a comment |
This looks more of a problem of your network equipment than the server itself.
Check /var/log/messages for ethernet link up/downs (or wlan in case of wireless). If so try changing the cables.
Yes, i tried and succeeded in making an ssh connection from outside of my network (which my server and my PC are located in). It seems working well. My server is also a web server. When I try to connect over port 80 from my PC, i see my ADSL modem's login page. But when I try the same thing from another computer which is outside my network, I see Apache's It Works page.
– frbry
Mar 12 '11 at 19:08
What is you PC ip, your server ip and your internal adsl router ip?
– forcefsck
Mar 12 '11 at 19:22
PC: 192.168.2.2 (Received from DHCP) Server: 192.168.2.254 (Static, out of DHCP range) ADSL Router: 192.168.2.1
– frbry
Mar 12 '11 at 19:24
I'm a bit confused, when you connect from 192.168.2.2 to 192.168.2.254 port 80 you get the adsl modem's login?
– forcefsck
Mar 12 '11 at 19:54
1
Unless you have setup some kind of web proxy to your server, then clearly your adsl modem is responding to requests made to 192.168.2.254 and probably that's the case when you get theConnection refused
error with ssh. So you have to recheck the settings of your adsl modem.
– forcefsck
Mar 12 '11 at 20:27
|
show 1 more comment
This looks more of a problem of your network equipment than the server itself.
Check /var/log/messages for ethernet link up/downs (or wlan in case of wireless). If so try changing the cables.
Yes, i tried and succeeded in making an ssh connection from outside of my network (which my server and my PC are located in). It seems working well. My server is also a web server. When I try to connect over port 80 from my PC, i see my ADSL modem's login page. But when I try the same thing from another computer which is outside my network, I see Apache's It Works page.
– frbry
Mar 12 '11 at 19:08
What is you PC ip, your server ip and your internal adsl router ip?
– forcefsck
Mar 12 '11 at 19:22
PC: 192.168.2.2 (Received from DHCP) Server: 192.168.2.254 (Static, out of DHCP range) ADSL Router: 192.168.2.1
– frbry
Mar 12 '11 at 19:24
I'm a bit confused, when you connect from 192.168.2.2 to 192.168.2.254 port 80 you get the adsl modem's login?
– forcefsck
Mar 12 '11 at 19:54
1
Unless you have setup some kind of web proxy to your server, then clearly your adsl modem is responding to requests made to 192.168.2.254 and probably that's the case when you get theConnection refused
error with ssh. So you have to recheck the settings of your adsl modem.
– forcefsck
Mar 12 '11 at 20:27
|
show 1 more comment
This looks more of a problem of your network equipment than the server itself.
Check /var/log/messages for ethernet link up/downs (or wlan in case of wireless). If so try changing the cables.
This looks more of a problem of your network equipment than the server itself.
Check /var/log/messages for ethernet link up/downs (or wlan in case of wireless). If so try changing the cables.
edited Mar 12 '11 at 18:56
answered Mar 12 '11 at 18:41
forcefsckforcefsck
27536
27536
Yes, i tried and succeeded in making an ssh connection from outside of my network (which my server and my PC are located in). It seems working well. My server is also a web server. When I try to connect over port 80 from my PC, i see my ADSL modem's login page. But when I try the same thing from another computer which is outside my network, I see Apache's It Works page.
– frbry
Mar 12 '11 at 19:08
What is you PC ip, your server ip and your internal adsl router ip?
– forcefsck
Mar 12 '11 at 19:22
PC: 192.168.2.2 (Received from DHCP) Server: 192.168.2.254 (Static, out of DHCP range) ADSL Router: 192.168.2.1
– frbry
Mar 12 '11 at 19:24
I'm a bit confused, when you connect from 192.168.2.2 to 192.168.2.254 port 80 you get the adsl modem's login?
– forcefsck
Mar 12 '11 at 19:54
1
Unless you have setup some kind of web proxy to your server, then clearly your adsl modem is responding to requests made to 192.168.2.254 and probably that's the case when you get theConnection refused
error with ssh. So you have to recheck the settings of your adsl modem.
– forcefsck
Mar 12 '11 at 20:27
|
show 1 more comment
Yes, i tried and succeeded in making an ssh connection from outside of my network (which my server and my PC are located in). It seems working well. My server is also a web server. When I try to connect over port 80 from my PC, i see my ADSL modem's login page. But when I try the same thing from another computer which is outside my network, I see Apache's It Works page.
– frbry
Mar 12 '11 at 19:08
What is you PC ip, your server ip and your internal adsl router ip?
– forcefsck
Mar 12 '11 at 19:22
PC: 192.168.2.2 (Received from DHCP) Server: 192.168.2.254 (Static, out of DHCP range) ADSL Router: 192.168.2.1
– frbry
Mar 12 '11 at 19:24
I'm a bit confused, when you connect from 192.168.2.2 to 192.168.2.254 port 80 you get the adsl modem's login?
– forcefsck
Mar 12 '11 at 19:54
1
Unless you have setup some kind of web proxy to your server, then clearly your adsl modem is responding to requests made to 192.168.2.254 and probably that's the case when you get theConnection refused
error with ssh. So you have to recheck the settings of your adsl modem.
– forcefsck
Mar 12 '11 at 20:27
Yes, i tried and succeeded in making an ssh connection from outside of my network (which my server and my PC are located in). It seems working well. My server is also a web server. When I try to connect over port 80 from my PC, i see my ADSL modem's login page. But when I try the same thing from another computer which is outside my network, I see Apache's It Works page.
– frbry
Mar 12 '11 at 19:08
Yes, i tried and succeeded in making an ssh connection from outside of my network (which my server and my PC are located in). It seems working well. My server is also a web server. When I try to connect over port 80 from my PC, i see my ADSL modem's login page. But when I try the same thing from another computer which is outside my network, I see Apache's It Works page.
– frbry
Mar 12 '11 at 19:08
What is you PC ip, your server ip and your internal adsl router ip?
– forcefsck
Mar 12 '11 at 19:22
What is you PC ip, your server ip and your internal adsl router ip?
– forcefsck
Mar 12 '11 at 19:22
PC: 192.168.2.2 (Received from DHCP) Server: 192.168.2.254 (Static, out of DHCP range) ADSL Router: 192.168.2.1
– frbry
Mar 12 '11 at 19:24
PC: 192.168.2.2 (Received from DHCP) Server: 192.168.2.254 (Static, out of DHCP range) ADSL Router: 192.168.2.1
– frbry
Mar 12 '11 at 19:24
I'm a bit confused, when you connect from 192.168.2.2 to 192.168.2.254 port 80 you get the adsl modem's login?
– forcefsck
Mar 12 '11 at 19:54
I'm a bit confused, when you connect from 192.168.2.2 to 192.168.2.254 port 80 you get the adsl modem's login?
– forcefsck
Mar 12 '11 at 19:54
1
1
Unless you have setup some kind of web proxy to your server, then clearly your adsl modem is responding to requests made to 192.168.2.254 and probably that's the case when you get the
Connection refused
error with ssh. So you have to recheck the settings of your adsl modem.– forcefsck
Mar 12 '11 at 20:27
Unless you have setup some kind of web proxy to your server, then clearly your adsl modem is responding to requests made to 192.168.2.254 and probably that's the case when you get the
Connection refused
error with ssh. So you have to recheck the settings of your adsl modem.– forcefsck
Mar 12 '11 at 20:27
|
show 1 more comment
I can confirm this exact issue: It's not a simple connectivity issue. The ethernet link does not change state; server is reachable via ping; ssh connects flawlessly occasionally, then seemingly randomly does not connect or existing ssh session drops. This occurs on Ubuntu 10.04 and 11.04. Following hheimbuerger's suggestion I gave the server a static IP, this seemed to fix it.
Workaround: Change adapter from DHCP to static.
add a comment |
I can confirm this exact issue: It's not a simple connectivity issue. The ethernet link does not change state; server is reachable via ping; ssh connects flawlessly occasionally, then seemingly randomly does not connect or existing ssh session drops. This occurs on Ubuntu 10.04 and 11.04. Following hheimbuerger's suggestion I gave the server a static IP, this seemed to fix it.
Workaround: Change adapter from DHCP to static.
add a comment |
I can confirm this exact issue: It's not a simple connectivity issue. The ethernet link does not change state; server is reachable via ping; ssh connects flawlessly occasionally, then seemingly randomly does not connect or existing ssh session drops. This occurs on Ubuntu 10.04 and 11.04. Following hheimbuerger's suggestion I gave the server a static IP, this seemed to fix it.
Workaround: Change adapter from DHCP to static.
I can confirm this exact issue: It's not a simple connectivity issue. The ethernet link does not change state; server is reachable via ping; ssh connects flawlessly occasionally, then seemingly randomly does not connect or existing ssh session drops. This occurs on Ubuntu 10.04 and 11.04. Following hheimbuerger's suggestion I gave the server a static IP, this seemed to fix it.
Workaround: Change adapter from DHCP to static.
answered Jul 7 '11 at 19:07
GeorgeGeorge
312
312
add a comment |
add a comment |
I had exactly the same issue, and in my case it turned out to be an IP address conflict. My Ubuntu VM had a dynamic address, but another machine (in this case a phone) had a static IP assigned that the DHCP server did not know about.
Just changing the IP that was assigned by the DHCP server to the Ubuntu VM fixed all connection issues.
add a comment |
I had exactly the same issue, and in my case it turned out to be an IP address conflict. My Ubuntu VM had a dynamic address, but another machine (in this case a phone) had a static IP assigned that the DHCP server did not know about.
Just changing the IP that was assigned by the DHCP server to the Ubuntu VM fixed all connection issues.
add a comment |
I had exactly the same issue, and in my case it turned out to be an IP address conflict. My Ubuntu VM had a dynamic address, but another machine (in this case a phone) had a static IP assigned that the DHCP server did not know about.
Just changing the IP that was assigned by the DHCP server to the Ubuntu VM fixed all connection issues.
I had exactly the same issue, and in my case it turned out to be an IP address conflict. My Ubuntu VM had a dynamic address, but another machine (in this case a phone) had a static IP assigned that the DHCP server did not know about.
Just changing the IP that was assigned by the DHCP server to the Ubuntu VM fixed all connection issues.
answered Apr 14 '11 at 8:21
hheimbuergerhheimbuerger
4501510
4501510
add a comment |
add a comment |
It's basically because of any one of the following reasons:
- Too many users on the network trying to access the server
- More than one computer on the network has the same IP as the server causing an IP conflict
- Wrong username or your credentials have been revoked
add a comment |
It's basically because of any one of the following reasons:
- Too many users on the network trying to access the server
- More than one computer on the network has the same IP as the server causing an IP conflict
- Wrong username or your credentials have been revoked
add a comment |
It's basically because of any one of the following reasons:
- Too many users on the network trying to access the server
- More than one computer on the network has the same IP as the server causing an IP conflict
- Wrong username or your credentials have been revoked
It's basically because of any one of the following reasons:
- Too many users on the network trying to access the server
- More than one computer on the network has the same IP as the server causing an IP conflict
- Wrong username or your credentials have been revoked
edited Dec 17 '13 at 18:25
Glutanimate
16.3k874132
16.3k874132
answered Dec 10 '12 at 13:16
Mevin BabuMevin Babu
4931412
4931412
add a comment |
add a comment |
You might want to check your iptables
rules on your server. It sounds like you've a rule for limiting new SSH connections.
The next rule allows 5 new connections per minute, if you exceed this limit, your new connections will be rejected after some time has passed:
-A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW -m limit --limit 5/min -j ACCEPT
See the IPTables / Netfilter documentation, scroll a bit till limit
.
add a comment |
You might want to check your iptables
rules on your server. It sounds like you've a rule for limiting new SSH connections.
The next rule allows 5 new connections per minute, if you exceed this limit, your new connections will be rejected after some time has passed:
-A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW -m limit --limit 5/min -j ACCEPT
See the IPTables / Netfilter documentation, scroll a bit till limit
.
add a comment |
You might want to check your iptables
rules on your server. It sounds like you've a rule for limiting new SSH connections.
The next rule allows 5 new connections per minute, if you exceed this limit, your new connections will be rejected after some time has passed:
-A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW -m limit --limit 5/min -j ACCEPT
See the IPTables / Netfilter documentation, scroll a bit till limit
.
You might want to check your iptables
rules on your server. It sounds like you've a rule for limiting new SSH connections.
The next rule allows 5 new connections per minute, if you exceed this limit, your new connections will be rejected after some time has passed:
-A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW -m limit --limit 5/min -j ACCEPT
See the IPTables / Netfilter documentation, scroll a bit till limit
.
answered Mar 12 '11 at 19:04
LekensteynLekensteyn
124k49270361
124k49270361
add a comment |
add a comment |
arp-scan is showing two duplicate devices, but when I run Advanced IP scanner on Win8 they all look fine. So they don't always agree.
I set the router to revoke all the leases by telling it to give only 1-hour leases. Will give it time to see if it clears up.
add a comment |
arp-scan is showing two duplicate devices, but when I run Advanced IP scanner on Win8 they all look fine. So they don't always agree.
I set the router to revoke all the leases by telling it to give only 1-hour leases. Will give it time to see if it clears up.
add a comment |
arp-scan is showing two duplicate devices, but when I run Advanced IP scanner on Win8 they all look fine. So they don't always agree.
I set the router to revoke all the leases by telling it to give only 1-hour leases. Will give it time to see if it clears up.
arp-scan is showing two duplicate devices, but when I run Advanced IP scanner on Win8 they all look fine. So they don't always agree.
I set the router to revoke all the leases by telling it to give only 1-hour leases. Will give it time to see if it clears up.
answered Jun 23 '17 at 21:15
SDsolarSDsolar
1,61451938
1,61451938
add a comment |
add a comment |
protected by Community♦ Jan 8 '14 at 18:47
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
next time it craps out like that; run a ping on it again, does it still work? how many people ssh to this machine?
– myusuf3
Mar 13 '11 at 4:33
Only I ssh this server.
– frbry
Mar 13 '11 at 12:03
Exactly the same problem here, also getting a mix of successful connects (which then work for hours), 'connection refused' and 'software caused connection abort' after the login or password entry. To provide some additional details: in my case it's a 64-bit virtual machine (running Ubuntu Server 10.10) on a Microsoft Hyper-V host, using the "old network card" emulation.
– hheimbuerger
Mar 31 '11 at 12:24
SSH is installed on your server?
– Willian Soares
Jan 8 '14 at 18:27