tadejkkk
Posts: 19
Joined: Sun Jun 29, 2014 10:52 am

Putty connection timed out

Tue Jul 01, 2014 4:55 pm

At the moment i don't have a screen and a kayboard at home, i only have my laptop. I have to set up my RPi, and used the remote access via SHH. The network setting are fine i guess because when i ping my RPi i get a lot of response. But when i try connecting via Putty the connection times out. What is the problem?

User avatar
lmarmisa
Posts: 1268
Joined: Thu Feb 14, 2013 2:22 am
Location: Jávea, Spain

Re: Putty connection timmed out

Tue Jul 01, 2014 5:27 pm

Maybe the problem is related to the Windows firewall.

Disable it for testing if this is the cause of your problem. If so, enable it again and add a exception to the firewall for putty.

oliv93
Posts: 46
Joined: Sat Jun 14, 2014 2:31 pm

Re: Putty connection timmed out

Tue Jul 01, 2014 8:10 pm

What command line do you use to ping your Rpi without knowing your IP adress?

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Putty connection timmed out

Tue Jul 01, 2014 8:28 pm

I like Fing
http://www.overlooksoft.com/getfing4win

I also like ARP Monitor
http://binaryplant.com/

You can do the sledgehammer ping

Code: Select all

FOR /L %i IN (1,1,254) DO ping -n 1 10.1.1.%i | FIND /i "Reply" | FIND /i /v "unreachable" >> %temp%\ip_addrs.txt
type %temp%\ip_addrs.txt
If you are a complete masochist you could try installing nmap on Windows.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

tadejkkk
Posts: 19
Joined: Sun Jun 29, 2014 10:52 am

Re: Putty connection timmed out

Wed Jul 02, 2014 11:07 am

I turned the firewall off and made an exception and it still timmes out. I know the IP adress because i set it up in cmdline in raspbian boot. I set it up at 192.168.1.3 and ping it using cmd and get response. I don't know why it doesn't want to connect. I also got the same IP using ARP monitor.

User avatar
RaTTuS
Posts: 10563
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Putty connection timmed out

Wed Jul 02, 2014 11:16 am

what is your laptop IP
and what is your router IP
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

tadejkkk
Posts: 19
Joined: Sun Jun 29, 2014 10:52 am

Re: Putty connection timmed out

Wed Jul 02, 2014 12:02 pm

I turn the wifi off, my IPv4 adress is 169.254.102.250. I put my SD card into the reader and i added the line ip=169.254.0.2 into cmdline.txt as instructed. Now when i ping the adress 169.254.0.2 in cmd i don't get any response.

User avatar
lmarmisa
Posts: 1268
Joined: Thu Feb 14, 2013 2:22 am
Location: Jávea, Spain

Re: Putty connection timmed out

Wed Jul 02, 2014 12:11 pm

The IP address 169.254.102.250 is not a private address. This is a public IP address.

Therefore your laptop is not connected to your LAN but directly to the Internet.

Please, give us some information about your network architecture (router, RPi network interface, laptop network interface, internet connection type).

User avatar
DougieLawson
Posts: 39304
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Putty connection timmed out

Wed Jul 02, 2014 12:38 pm

lmarmisa wrote:The IP address 169.254.102.250 is not a private address. This is a public IP address.
Er, no it's not. It's the IPv4LL network. http://tools.ietf.org/rfc/rfc6890.txt
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

tadejkkk
Posts: 19
Joined: Sun Jun 29, 2014 10:52 am

Re: Putty connection timmed out

Wed Jul 02, 2014 1:53 pm

Laptop IP: 192.168.1.2, Router IP: 192.168.1.1, Local IP: 169.254.102.250

User avatar
RaTTuS
Posts: 10563
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Putty connection timmed out

Wed Jul 02, 2014 2:00 pm

tadejkkk wrote:Laptop IP: 192.168.1.2, Router IP: 192.168.1.1, Local IP: 169.254.102.250
ok 169 and 192 are not on the same network
if your RPi is connected to your router and not direct to your PC then you need an address like 192.168.1.3 [or 3 - 254]

if you are doing something else can you say how your network is wired up
wired ? wireless ?
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

tadejkkk
Posts: 19
Joined: Sun Jun 29, 2014 10:52 am

Re: Putty connection timmed out

Wed Jul 02, 2014 3:02 pm

I tried both 169... and 192... I'm on a laptop with a wifi connection and have my RPi directly connected to the computer.

User avatar
RaTTuS
Posts: 10563
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Putty connection timmed out

Wed Jul 02, 2014 3:26 pm

How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

tadejkkk
Posts: 19
Joined: Sun Jun 29, 2014 10:52 am

Re: Putty connection timmed out

Wed Jul 02, 2014 4:14 pm

I already did, i used the instructions linked in that topic.

User avatar
RaTTuS
Posts: 10563
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Putty connection timmed out

Wed Jul 02, 2014 4:20 pm

are you using internet connection sharing ?
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

tadejkkk
Posts: 19
Joined: Sun Jun 29, 2014 10:52 am

Re: Putty connection timmed out

Wed Jul 02, 2014 5:16 pm

No.

User avatar
lmarmisa
Posts: 1268
Joined: Thu Feb 14, 2013 2:22 am
Location: Jávea, Spain

Re: Putty connection timmed out

Wed Jul 02, 2014 6:07 pm

You are connecting your laptop and your RPi directly by means of an Ethernet cable.

The main LAN is the subnet 192.168.1.0/24 (wifi). You have added a second subnet that connects your laptop and RPi.

You should assign a different subnet number to this Ethernet subnet. For example, 192.168.2.0/24 (Ethernet).

You have to configure manually the IP addresses of both sides (laptop and RPi) on the Ethernet subnet.

Configure manually the Ethernet interface (do not change the windows wifi interface!!! modify only the config of the Ethernet interface!!!) with a static IP address following these instructions: http://kb.mit.edu/confluence/display/is ... IP+Address

Use these parameters:

IP address: 192.168.2.1
Subnet mask: 255.255.255.0
Default gateway: none
DNS: 8.8.8.8

If you have a Linux system and a SD card reader, you will be able to edit the file /etc/network/interfaces located in the SD card of RPi. The content should be:

Code: Select all

auto lo

iface lo inet loopback
iface eth0 inet static

address 192.168.2.2
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
gateway 192.168.2.1

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
If you are unable to edit such file because you have no Linux system available, edit the file cmdline.txt and append this text to the end of the line:

Code: Select all

ip=192.168.2.2::192.168.2.1:255.255.255.0:rpi:eth0:off
Finally you should enable the IP routing feature on your laptop:

http://www.wikihow.com/Enable-IP-Routing

tadejkkk
Posts: 19
Joined: Sun Jun 29, 2014 10:52 am

Re: Putty connection timmed out

Wed Jul 02, 2014 6:51 pm

I did as instructed. When i check ipconfig/all the routing is enabled, wifi network IP: 192.168.1.2, Ethernet IP: 192.168.2.1 and i add the command ip=192.168.2.2 in the cmdline.txt on the RPi SD card. But when i ping 192.168.2.2 i get "destination host unreachable".

User avatar
lmarmisa
Posts: 1268
Joined: Thu Feb 14, 2013 2:22 am
Location: Jávea, Spain

Re: Putty connection timmed out

Wed Jul 02, 2014 7:00 pm

I edited the cmdline.txt line on my last post adding more parameters according to this link:

http://www.raspberrypi.org/forums/viewt ... 50#p229450

Please, try to include this additional info in cmdline.txt.

Do you see LED activity on your RPi while your laptop pings?

Code: Select all

ping -t 192.168.2.2
EDIT: Please, run this command on your laptop and send the output:

Code: Select all

route print

tadejkkk
Posts: 19
Joined: Sun Jun 29, 2014 10:52 am

Re: Putty connection timmed out

Thu Jul 03, 2014 11:15 am

LNK, and ACT are blinking the others are turned on.

===========================================================================
Interface List
14...08 ed b9 b8 57 bd ......Atheros AR9485WB-EG Wireless Network Adapter
13...30 f9 ed b1 ac 0f ......Realtek PCIe GBE Family Controller
12...08 ed b9 b8 57 be ......Bluetooth Device (Personal Area Network)
1...........................Software Loopback Interface 1
20...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
19...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
18...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
15...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.4 25
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
192.168.1.0 255.255.255.0 On-link 192.168.1.4 281
192.168.1.4 255.255.255.255 On-link 192.168.1.4 281
192.168.1.255 255.255.255.255 On-link 192.168.1.4 281
192.168.2.0 255.255.255.0 On-link 192.168.2.1 276
192.168.2.1 255.255.255.255 On-link 192.168.2.1 276
192.168.2.255 255.255.255.255 On-link 192.168.2.1 276
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 192.168.2.1 276
224.0.0.0 240.0.0.0 On-link 192.168.1.4 281
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 192.168.2.1 276
255.255.255.255 255.255.255.255 On-link 192.168.1.4 281
===========================================================================
Persistent Routes:
None

IPv6 Route Table
===========================================================================
Active Routes:
If Metric Network Destination Gateway
15 58 ::/0 On-link
1 306 ::1/128 On-link
15 58 2001::/32 On-link
15 306 2001:0:9d38:6ab8:2c9e:1434:a671:1c33/128
On-link
13 276 fe80::/64 On-link
14 281 fe80::/64 On-link
15 306 fe80::/64 On-link
14 281 fe80::10cc:3833:356b:c1ff/128
On-link
15 306 fe80::2c9e:1434:a671:1c33/128
On-link
13 276 fe80::b9c1:50ca:c59:66fa/128
On-link
1 306 ff00::/8 On-link
15 306 ff00::/8 On-link
13 276 ff00::/8 On-link
14 281 ff00::/8 On-link
===========================================================================
Persistent Routes:
None

User avatar
lmarmisa
Posts: 1268
Joined: Thu Feb 14, 2013 2:22 am
Location: Jávea, Spain

Re: Putty connection timmed out

Fri Jul 04, 2014 12:04 pm

I see a problem related to metrics.

The default route has assigned a metric 25 (interface 192.168.1.4):

Code: Select all

0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.4 25
The specific route for subnet 192.168.2.0/24 has a higher metric 276 (interface 192.168.2.1):

Code: Select all

192.168.2.0 255.255.255.0 On-link 192.168.2.1 276
If more than one rule are matched, the system will select the route with the lowest metric, in your case, the default route.

This is the reason because the traffic is not correctly routed to your RPi by your laptop. Assign a lower metric to the specific rule 192.168.2.0 (24 or less) and the routing will work as expected.

tadejkkk
Posts: 19
Joined: Sun Jun 29, 2014 10:52 am

Re: Putty connection timmed out

Fri Jul 04, 2014 10:03 pm

How do i assign the metric?

User avatar
lmarmisa
Posts: 1268
Joined: Thu Feb 14, 2013 2:22 am
Location: Jávea, Spain

Re: Putty connection timmed out

Fri Jul 04, 2014 10:23 pm

Select Local Area Connection (Ethernet interface) -> Properties -> IPv4 -> Properties -> Advanced. Then untick automatic metric and set the value of interface metric to, for example, 1.

Type again the command

Code: Select all

route print
and verify that metrics are correct.

You will see a line similar to this:

Code: Select all

192.168.2.0 255.255.255.0 On-link 192.168.2.1 1

tadejkkk
Posts: 19
Joined: Sun Jun 29, 2014 10:52 am

Re: Putty connection timed out

Sat Jul 05, 2014 7:50 pm

I brought home a hdmi monitor and set the ip in raspbian and it works fine. What do i have to do now to start using my internet connection of my laptop wifi on SSH?

HansB
Posts: 1
Joined: Sun Mar 17, 2019 6:09 pm

Putty Fatal error [Network error: Connection timed out]

Sun Mar 17, 2019 6:36 pm

Hello,

I'm a starting RPI user and have bought it together with a Z-Wave USB stick.
In the Putty terminal with SSH mode I get the following message:
"Putty Fatal error [Network error: Connection timed out]"

Network lay-out:
IP address router: 192.168.1.25
IP address RPI: 192.168.1.19

I can ping to the RPI and get 4 received out of 4 messages.
And when I enter the IP address of the RPI in internet explorer added wit :8080, like 192.168.1.19:8080 I get the screen with Domoticz, so I get into contact with the RP. But the screen is empty. I don't get the message that there is no hardwware conected yet and I don't get the possibility to add hardware in the hardware configuration.

Also the telnet command in the cmd dos box, gives: Could not open connection to the host, on port 22: Connection failed.

So as a starter I'm out of possible solutions.

Can anybody assist and propose a solution to this communication issue.

Thanks in advance,

Hans

Return to “Troubleshooting”