K
K
krll-k2014-11-10 19:35:30
Android
krll-k, 2014-11-10 19:35:30

Can't connect to my Raspberry Pi via ssh. The question is why?

The Raspberry Pi is connected to the network in the following way:

PRi -usb- Samsung(Android usb mobile AP) -wifi- Router Asus

On PRi:
ifconfig usb0
//интерфейс есть
ifdown -a
//сбросил все соединения
ifup usb0
//поднял только интересующий меня

//пингую гугловские сервера
ping 8.8.8.8
//все нормально
//сеть есть

I go into my Asus RT-N12D1 router, I see 4 clients:
1A-yPA5b0Eo.jpg
192.168.1.4 and 192.168.1.153 - immediately disappear, this is a laptop and a hospital;
192.168.1.150 is my downstairs neighbor;
It turns out that 192.168.1.41 is my RPi

I try to connect via ssh to 192.168.1.41 - connection timeout
I swear on Android usb AP

I start to check if 192.168.1.41 is really my RPi?
On laptop:
php -S 192.168.1.4:8080
//выхлоп по соединениям будет капать сюда

On PRi:
//подключаю к RPi к единственному свободному usb порту клавиатуру
wget http://192.168.1.4:8080

Again on the laptop:
I catch the exhaust - I determine that 192.168.1.41 belongs to the RPi

The question follows - why in such cases I can not join my RPi?
On PRi:
(/etc/network/interfaces)
iface usb0 inet dhcp
the old file had a different look (which is defoult)

I wonder if that's why it doesn't work?
There is a guess "why everything does not work out ":
when I raised the usb0 interface to PRI, the standard output method was information on the received IP

Photo:RWYrVwLY93Q.jpg
//код неудалось вывости с помощью ifup usb0 > file
//думал далее гитом взять

I think the picture shows that the network is raised for some reason to 192.168.42.xxx
Why is the network to 192.168.42.xxx? Is this the problem? If not, then what ?
The question is still the same "I can not connect to my Raspberry Pi via ssh. The question is why"?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Spetros, 2014-11-10
@krll-k

We enter ifconfig -a and check the ip addresses on the network interfaces.
Most likely "Android usb mobile AP" implements NAT technology, and hides the ip of devices behind it in its internal subnet. In order for a device on your local network to be directly accessible, that android must work in bridge mode, or routing to that subnet is configured.

K
krll-k, 2014-11-14
@krll-k

habrahabr.ru/post/237019

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question