Can't access SSH server when it's on a wireless laptop.
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can't access SSH server when it's on a wireless laptop.
Hello all, I've got a bit of a network problem I was hoping someone could shed some light on. I appreciate any help.
I have Debian installed on my laptop. When the laptop is connected to the network via ethernet cord, I can ssh into it fine. However if I switch to wireless, I can no longer SSH in.
I have confirmed SSHD is running.
I am switching between wired/wireless by editing /etc/network/interfaces and re-booting the laptop.
The laptop can connect to the internet, and SSH into other computers on the LAN just fine with either connection. But they can't connect to it when it's wireless.
When it's wireless, the laptop can SSH into itself as well.
My iptables is set to allow everything.
They're both on the same subnet.
Thanks for any help, I'm out of troubleshooting capabilities.
~R
Oh, I forgot to mention this isn't just SSH. I can't ping the laptop either when it is wireless. But it can ping other computers.
I have a Linksys router that I have clicked through the settings of a few times to make sure it doesn't have any "incoming wireless SSH" rules or something odd like that.
Are you using the same ip address for wired and wireless ? Because if you're using dhcp you will probably have a different address.
What is the error ?
I normally use a static ip, but to eliminate it as a suspect I switched to dhcp and try to ssh in with whatever ifconfig tells me the ipaddress is.
The error message I get from trying to putty in from a windows machine varies based on what I'm trying, but it is always one of these:
Connection timed out
Can't find route to 192.168.1.161
Host is down
And an 'unreachable' msg I can't remember the wording of.
I am able to use putty to connect to other Linux machines on the network. With the same Debian install as well, the only significant difference I can think of is this is a laptop and I'm using wireless. (also this laptop works when wired, so i'm inclined to think it's a wireless thing)
The error message I get from trying to putty in from a windows machine varies based on what I'm trying, but it is always one of these:
Connection timed out
Can't find route to 192.168.1.161
Host is down
And an 'unreachable' msg I can't remember the wording of.
On your wireless connected laptop, determine the interface name and IP address using ifconfig. Next, remember the interface name and:
Code:
# tcpdump -i <interface_here> icmp
Try pinging again. See any activity? If so, then iptables(8) is still not turned off, and it's throwing back confusing ICMP messages. If you do not see any activity, then pay attention to the error messages you're being told. There is simply no route to the wireless host (and they're not on the same subnet like you said earlier).
Try to access you laptop from a Linux client using "ssh -vvv". This will provide more debugging information on what the cause of the denial is.
The no route to host error indicates that you don't have an IP address in the subnet, or the default route for your laptop still uses eth0. Can you ping the laptop? Try "telnet w.x.y.z 20". This will use the telnet client to connect to port 22. You should see an initial connection if your networking/firewall is correct.
Double check that the firewall isn't blocking the wireless interface.
Check if the IP address uses same network address.
Check the route setup.
Check /etc/ssh/sshd_config. Does it have a ListenAddress line? That may bind the service to a particular device if the ipaddress changes.
Check hosts.allow. Does it bind sshd to a particular device (don't know offhand if it can)
Check login.defs. How does it restrict logins.
The authorized_keys file can contain entries with "from=<host_pattern>". If it contains an IP address which doesn't match, or a hostname which resolves differently, you might be denied a connection.
Jschiwal - The verbose ssh gave an error that there was no route to host.
Telnetting to port 22 also was unable to connect, as it couldn't find the host.
I went through the firewall settings again, there was no mention of restriction. I was reminded that I was forwarding port 22 to a specific box on my network, I disabled it in the hopes that some crazy conflict was occurring, but that yielded no results. It's a relatively new linksys router if that sptrings any suggestions to mind.
Not sure what you meant about ip address using the same network address or route setup.
logins.defs has some terminology I didn't quite understand, but reading the comments, nothign about restrictions jumped out at me. It should be default anyway.
I don't have an authorized_keys file on the system.
Thank you for the diagnostic suggestions, I'm currently looking up more info in these areas. It certainly looks liek a routing issue, because of the results of those test. And also, this occurs:
Desktop: ping <laptop ip>
(starts complaining about unreachable route)
And at the moment the laptop pings the desktop - the desktop is suddenly able to find the laptop and starts reporting successful pings.
Now there's an interesting piece of info. Is the netmask the same (/24) on both the desktop and the laptop? On the desktop side, does the ARP cache look different before / after it is magically able to ping the laptop?
The netmask for both Desktop (which I should probably mention is a PC) and the laptop are both 255.255.255.0
Looking up how to find ARP logs right now.
The router does have controls for allowing/disallowing certain MAC addresses, or giving certain MAC Addresses static IPs. All of that is not set right now.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.