2

I just got a fairly old model of Raspberry Pi (Model B with 512MB RAM). As I don't have an extra keyboard or screen, I'm trying to hook it up via ethernet with my laptop.

I copied a Raspbian image to a 16GB sd card. (2017-09-07-raspbian-stretch). I also made an empty file named "ssh" under /boot

I enabled IPv4 to share the network via ethernet, and used nmap to check the IP of my Pi. Result of the nmap is:

$nmap -sn 192.168.1.0/24

Starting Nmap 7.01 ( https://nmap.org ) at 2017-10-29 17:29 EET
Nmap scan report for 192.168.1.106
Host is up (0.00018s latency).
Nmap scan report for 192.168.1.253
Host is up (0.12s latency).
Nmap done: 256 IP addresses (2 hosts up) scanned in 10.13 seconds

According to ifconfig, my laptop's IP is 192.168.1.106, and I believe that 192.168.1.253 is the Raspberry.

I pinged 192.168.1.253, and it went through smoothly.

Then I tried to SSH into the Raspberry, but I always get "Connection timed out":

$ ssh -v pi@192.168.1.253
OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g  1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.1.253 [192.168.1.253] port 22.
debug1: connect to address 192.168.1.253 port 22: Connection timed out
ssh: connect to host 192.168.1.253 port 22: Connection timed out

As for power issues, I have LEDs PWR (red), FDX (green), LNK (green) and 100 (orange) on. Does that mean that the power is OK? I only have an SD card, ethernet cable, and power connected to the Raspberry.

I don't get why can't I SSH to the Raspberry. It would be really nice if anyone can help.

My laptop is on Ubuntu 16.04.

I found that in my Raspberry, under /etc, there's no folder /etc/folder, nor is there the file "dhcpd.conf". Could this be the cause of the problem?

  • nmap -sT -p22 192.168.1.0/24 should confirm whether the port is really open. If so you should check the logs on the SD card; unfortunately the default logging configuration may complicate that -- you may need to apply journald, since it does not leave a plain text log, or you may get lucky and find one in /var/log. – goldilocks Oct 29 '17 at 14:55
  • What do you get for the result of arp 192.168.1.253? – BowlOfRed Oct 29 '17 at 22:57
-1

For security, on most RaspberryPi distributions the SSH service needs to be activated. At www.raspberrypi.org are these instructions:

Launch Raspberry Pi Configuration from the Preferences menu
Navigate to the Interfaces tab
Select Enabled next to SSH
Click OK
  • I don't believe this is the issue—the OP says that they created /boot/ssh, which also works (see point 3 of the link you gave). It looks like it's something more complex instead. – Aurora0001 Oct 29 '17 at 18:14
  • I see what you are saying - @Aurora0001, perhaps you can explain. This method of dropping a empty file named ssh in the /boot directory, is is permanent or does it just work for that one boot up? I am asking as the instructions say the file is deleted after boot up. – st2000 Oct 30 '17 at 12:10
  • I believe the setting is persistent; the file is just deleted so that if you later disable it, it won't immediately be re-enabled on next boot. – Aurora0001 Oct 30 '17 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.