[SOLVED] raspbian: how to log in via ssh through wlan? (dont work; but ssh via LAN works)
DebianThis forum is for the discussion of Debian Linux.
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.
raspbian: how to log in via ssh through wlan? (dont work; but ssh via LAN works)
hello,
by connecting the raspberry to the LAN i can connect in with
Code:
ssh pi@192.168.178.31
from an asus laptop
I made the setup with wlan and it seems to work (I see the raspberry in my fritzbox router as IP 192.168.178.32).
The setup is:
Code:
# file /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Code:
# file /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
ap_scan=2
network={
ssid="myssidisthere"
scan_ssid=1
psk="myfullpasswordinfulltext"
# Protocol type can be: RSN (for WP2) and WPA (for WPA1)
proto=WPA2
# Key management type can be: WPA-PSK or WPA-EAP (Pre-Shared or Enterprise)
key_mgmt=WPA-PSK
# Pairwise can be CCMP or TKIP (for WPA2 or WPA1)
#pairwise=TKIP
pairwise=CCMP
group=CCMP
#Authorization option should be OPEN for both WPA1/WPA2 (in less commonly used $
auth_alg=OPEN
}
Code:
ssh pi@192.168.178.32
(32 is what I see now as IP in the router). but..
Code:
ssh: connect to host 192.168.178.32 port 22: No route to host
So, how to connect in the raspberry via ssh via wlan ?
I would like to use that raspberry pi as wlan camera and connect to it via ssh.
Last edited by floppy_stuttgart; 03-24-2014 at 01:43 PM.
I think there is a confusion as you have 2 network interfaces on the same subnet.
To test it, shutdown eth0 and try to connect.
If you have further problems, please post complete network config and routing table:
That is, the output of:
#sudo ifconfig
#sudo route
And what distro are you running?
--- edit: Ah, the title says! :-)
Last edited by pingu; 03-22-2014 at 10:56 AM.
Reason: Raspbian...
for both previous posts I will have to connect the raspberry pi to a monitor? (this is what I try to avoid).
Ah, perhaps I should uncomment the eth0 but in that case I cannot connect it anymore to the LAN and I will have to go to a monitor if something dont connect?
#iface eth0 inet dhcp
#iface default inet dhcp
With afresh boot, LAN cable away, the raspberry pi is seen as wlan connected to the router.
(on the client; I see the "32" as connected in my router via WLAN))
gives the output
Code:
OpenSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.178.32 [192.168.178.32] port 22.
debug1: connect to address 192.168.178.32 port 22: No route to host
ssh: connect to host 192.168.178.32 port 22: No route to host
TRY NUMBER 2:
Code:
ssh -v -v -v pi@raspcamera
gives (so: avahi seems to work)
Code:
OpenSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to raspcamera [192.168.178.32] port 22.
debug1: connect to address 192.168.178.32 port 22: No route to host
ssh: connect to host raspcamera port 22: No route to host
(I am still headless, so can only work from the client. Next step will be to find a screen and make the command recommended on the raspberry pi)
Last edited by floppy_stuttgart; 03-23-2014 at 03:10 PM.
Im trying a workaround with avahi; by installing avahi like here recommended an error occur
What error? All I see is a warning about LSB overrides - that's not fatal, just a warning. The init-script lacks some information about what services to start before, what it depends on and such.
It will still startup fine.
And how about this:
"If you have further problems, please post complete network config and routing table:
That is, the output of:
#sudo ifconfig
#sudo route "
That is, the output of:
#sudo ifconfig
#sudo route "
I know I know.. the raspberry pi is still headless, so I cannot start it at a screen and make that commands when it is in the WLAN. I ordered a cable for a pc screen I have and will connect the raspberry as soon it arrives (no way to connect to the TV and HDMI else the family is NOT happy).
I see your problem!
It might still be helpful to get that info when the pi is connected to both LAN & WAN.
Now how is your network setup? You have a router, a WAP etc - exactly what do you have, how is it configured, to what switches/routers/WAP is your pi connected? Could you give us a detailed network diagram?
(And don't make your family unhappy - you'll need them some day! ;-) )
Solved.
The router FRITZBOX 7170 setup had to be changed in "boxes can communicate via WLAN together"
It was not the case till now (my client was connected to the router via WLAN; the raspberry too).
Last edited by floppy_stuttgart; 03-24-2014 at 01:44 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.