LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Cannot connect to ssh server (https://www.linuxquestions.org/questions/linux-software-2/cannot-connect-to-ssh-server-4175417098/)

Lumify 07-17-2012 12:37 AM

Cannot connect to ssh server
 
When I try connecting to my Debian ssh server from Windows using Kitty, the connection times out. The Windows client and the Debian server are on the same wifi network. It doesn't even prompt me for a username. I can ssh into localhost from the server, and it worked when the server was on a different wifi network. I can connect to the internet from the server and the client. What could be going wrong?

evo2 07-17-2012 12:42 AM

Hi,

what sort of wireless network is this? Many wireless networks (including home routers) are setup to disallow traffic between devices on the network.
Can you ping one machine from the other?

Evo2.

vp0619520 07-17-2012 04:49 AM

Hi, is the iptables running in your server?When you ssh the server,what is the default port number used by kitty?

Lumify 07-17-2012 06:28 PM

This is my home router. I have access to the router configuration page. When I ping the server's IP from the Windows client, I get a reply from a different IP.

Code:

ping 10.0.0.61

Pinging 10.0.0.61 with 32 bytes of data:
Reply from 10.0.0.11: Destination host unreachable.
Reply from 10.0.0.11: Destination host unreachable.
Reply from 10.0.0.11: Destination host unreachable.
Reply from 10.0.0.11: Destination host unreachable.

Ping statistics for 10.0.0.61:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

iptables -L gives this:

Code:

Chain INPUT (policy ACCEPT)
 target    prot opt source              destination

 Chain FORWARD (policy ACCEPT)
 target    prot opt source              destination

 Chain OUTPUT (policy ACCEPT)
 target    prot opt source              destination

Does that mean it's off?

Kitty uses port 22 by default. To make sure, I've tried specifying the port before I connect.

evo2 07-17-2012 07:07 PM

Hi,

so this looks like a network problem, not sshd problem and not a firewall problem (on the machine running sshd).

Have you tried running a traceroute to 10.0.0.61?

Evo2.

Lumify 07-17-2012 07:43 PM

Quote:

Originally Posted by evo2 (Post 4731114)
Hi,

so this looks like a network problem, not sshd problem and not a firewall problem (on the machine running sshd).

Have you tried running a traceroute to 10.0.0.61?

Evo2.

Code:

tracert 10.0.0.61

Tracing route to 10.0.0.61 over a maximum of 30 hops

  1  Lumify-PC [10.0.0.11]  reports: Destination host unreachable.

Trace complete.

How can I work around this network problem?

evo2 07-17-2012 09:30 PM

Hi,

I think you need to configure your router. Point your browser at it and configure it. It may have built in help, or you may need to read the manual.

Cheers,

Evo2.

Lumify 07-17-2012 09:55 PM

My server was disconnecting from the wifi network whenever I logged out of Gnome. I went to the wifi options and enabled the connection for all users. Now it's working.

Lumify 07-30-2012 11:19 PM

I'm having exactly the same problem, with the same ping/iptables/traceroute results, but with another ssh server (this thread seems reusable). This time, I've verified that it's connected to the internet by pinging google.com from the server. I've enabled and disabled every option on the router configuration pages. This took ages, and yielded no results.

Finally, I tried forwarding port 22 to the ssh server. Now I can ssh into it by using my external IP address. Is ssh through the external IP address inefficient? I'll be using this server for SFTP frequently, so I need speed. Samba isn't working either. If I can get ssh to work within the LAN, I bet Samba would work too.

Another issue: Both this server and the other one spontaneously disconnect from the wifi network after a few minutes. Since this server is headless and monitor/keyboardless, I have to restart it whenever this happens. I only have access to a keyboard and monitor for a few minutes at a time.

Lumify 07-31-2012 03:43 PM

The wifi router is a Netgear WNR2000, and the usb wifi adapter is a D-Link DWL-G122.

ilesterg 07-31-2012 09:42 PM

Quote:

Originally Posted by evo2 (Post 4730194)
Hi,

what sort of wireless network is this? Many wireless networks (including home routers) are setup to disallow traffic between devices on the network.
Can you ping one machine from the other?

Evo2.

The post quoted says it all. You could explore your router how to make a workaround on this.

Lumify 07-31-2012 10:13 PM

Quote:

Originally Posted by ilesterg (Post 4742658)
The post quoted says it all. You could explore your router how to make a workaround on this.

I've enabled and disabled every option possible on the Netgear WNR2000 router. (I can't ping the server)

I have no problem sshing from my laptop running the ssh client Kitty on Windows 7 to another old laptop running Debian, my rooted Android phone running a ssh server, and my rooted Nook running an ssh server. I have no problem sshing into these three other devices. This leads me to believe this is a problem with this individual computer.

evo2 07-31-2012 10:26 PM

Hi,

Quote:

Originally Posted by Lumify (Post 4741823)
I'm having exactly the same problem

Really?

If you want help I strongly suggest you very briefly describe exactly what the problem is in a new thread.

If this is an ssh problem. You should include information like:
- Results of ssh to localhost
- Confirmation of ping to the server
- Confirmation the port is open on the server (eg nmap)
- Contents of /var/log/auth.log on the on the machine running sshd when you try to ssh to it
- Output of "ssh -vvv" when you try to ssh to the server

Etc.

Evo2.


All times are GMT -5. The time now is 03:26 PM.