6

I am trying to get an original model Raspberry Pi working. I've installed 2015-05-05-raspbian-wheezy, and if I boot with a TV connected via composite, I get image on the screen and it gets as far as the raspi-config screen. So far, so good, but my wish is to perform a "headless" install - without screen & keyboard. So, I've connected the Pi to my local network via wired connection to my router. I have another computer, and I'm trying to ssh into the Pi from it.

sudo arp-scan --interface=wlan0 --localnet
Interface: wlan0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.8.1 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
192.168.100.1   00:0c:c3:7f:7e:63   BeWAN systems

1 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.8.1: 256 hosts scanned in 1.948 seconds (131.42 hosts/sec). 1 responded

That's my router. In the router's config panel, I can see the Pi and that it has an IP - in this case, 192.168.100.39.

ssh:

ssh pi@192.168.100.39
ssh: connect to host 192.168.100.39 port 22: No route to host

ping:

ping 192.168.100.39
PING 192.168.100.39 (192.168.100.39) 56(84) bytes of data.
^C
--- 192.168.100.39 ping statistics ---
75 packets transmitted, 0 received, 100% packet loss, time 74210ms

I got it through a couple of times, but the statistics look like 141 packets transmitted, 1 received, 99% packet loss, time 140674ms

nmap:

nmap -Pn 192.168.100.39 -p 22

Starting Nmap 6.47 ( http://nmap.org ) at 2015-06-16 15:03 EEST
Nmap scan report for 192.168.100.39
Host is up.
PORT   STATE    SERVICE
22/tcp filtered ssh

Nmap done: 1 IP address (1 host up) scanned in 2.82 seconds

Around the same time as I got a few ping requests through, the output from ssh changed to ssh: connect to host 192.168.100.39 port 22: Connection timed out sometimes, no route to host as before on other times.

Edit: I now get consistent, sensible ping responses, with 0% packet loss. I did not change anything, so this is weird, but a change for the better. Also, the Pi is now visible with arp-scan:

arp-scan --localnet
Interface: wlan0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.8.1 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
192.168.100.1   00:0c:c3:7f:7e:63   BeWAN systems
192.168.100.39  b8:27:eb:f9:54:da   (Unknown)
techraf
  • 4,319
  • 10
  • 31
  • 42
appas
  • 211
  • 2
  • 7
  • What does it say when you try to ssh to rpi ip ? – dhruvvyas90 Jun 16 '15 at 12:41
  • Oh yeah, I forgot that (doh!). Updated. – appas Jun 16 '15 at 12:44
  • That's strange. Are you sure your rpi is having the same ip, because it doesn't look like it. – dhruvvyas90 Jun 16 '15 at 13:16
  • Can you remove HDMI and reboot and see what happens ? – dhruvvyas90 Jun 16 '15 at 13:18
  • @dastaan the IP is directly from the router. I'm not sure what you mean wrt. HDMI - I checked config.txt and there are no uncommented HDMI entries. The picture does output via composite video, and to my knowledge, the two can't be enabled at the same time (?). – appas Jun 16 '15 at 13:24
  • I meant remove display. Just let it run headless, ie Rpi + supply + Ethernet plugged in – dhruvvyas90 Jun 16 '15 at 13:59
  • Have you enable SSH in RPi ?Please Let me know, i tried same thing yesterday it is working fine for me – AKASH Jun 16 '15 at 12:23
  • No I haven't, it's a fresh, untouched flash of the image. It is my understanding that sshd should be enabled by default (?). – appas Jun 16 '15 at 12:44
  • I guess you have to enable it – AKASH Jun 16 '15 at 13:01
  • 2
    It's enabled by default in raspbian wheezy. – dhruvvyas90 Jun 16 '15 at 13:08
  • I found this answer about enabling ssh, and followed the instructions, but am stuck at the same point. – appas Jun 16 '15 at 13:14
  • https://learn.adafruit.com/system/assets/assets/000/003/151/medium800/learn_raspberry_pi_raspi_config_ssh1.png?1396792349 – AKASH Jun 16 '15 at 13:26
  • Didn't you get this window at startup ? – AKASH Jun 16 '15 at 13:27
  • I get the raspi-config window, yes, but mine's different. Only the first nine entries are shown, and SSH is not one of them (as I said, I'm running headless, so I can't navigate the list). I found this piece of documentation: https://www.raspberrypi.org/documentation/remote-access/ssh/ that clearly says "You can enable or disable the SSH server on your Raspberry Pi (it is enabled by default)" – appas Jun 16 '15 at 13:32
  • which ssh client software you are using? – AKASH Jun 16 '15 at 14:23
  • Are you using a home router? The third number in the IP address makes me think that you're not, and that device to device communication may be disabled. – Jacobm001 Jun 16 '15 at 16:00
  • @AKASH I'm using the OpenSSH client, version 1:6.7p1-6 on Debian. – appas Jun 16 '15 at 23:26
  • @dastaan That's how I'm running it, yes. – appas Jun 16 '15 at 23:32
  • @Jacobm001 Yes I am, a Bewan iBox. I'd like to update that I've gotten ping through, but it's very sporadic (see the edit in the OP). – appas Jun 16 '15 at 23:32
  • Try connecting it via other router - I assume there must be sth wrong as I have exactly the same wheezy version and headless works with no problem. – Marian Paździoch Jan 13 '16 at 07:41
  • I've had vaguely similar problems with poor ping response etc, it was solved by spotting that CPU usage was maxed, so I killing the culprit and stopped it running on startup – Jodes Oct 25 '16 at 07:03
  • You don't have to use an old version of raspbian on the original B. I've used jessie with no issues and would expect stretch to work the same way. – bobstro Nov 14 '17 at 22:29

2 Answers2

1

On your computer download a program named PuTTy and put the IP address of you Raspberry Pi into it and select the connection type as SSH. This will open a window, you will be prompted to enter your login and password for your Raspberry Pi.

If you want to run fully headless, I recommend using a program called VNC viewer, which allows you to view the Raspberry Pi desktop from your computer wirelessly.

Darth Vader
  • 4,206
  • 24
  • 45
  • 69
  • 1
    I'm using the OpenSSH client, version 1:6.7p1-6 on Debian. I have inserted the output of an attempted ssh connection to the OP. I'm aware of VNC, but for now, I have no control of the machine over ssh, which is the problem to begin with. – appas Jun 16 '15 at 23:06
  • 1
    I don't knew if you can actually connect because you didn't say yes or no. Can any other device with ssh on your network connect the the pi? – Registered User Jun 17 '15 at 03:50
0

It happened to me once when using the raspi-config utility to enable SSH that something seemed to behave weird, since then i just enable it using the shell.

When making a new install of Raspbian I immediately enable SSH as:

sudo systemctl enable ssh
sudo systemctl start ssh

Then I can go and SSH to PI from my PC, then update, upgrade and reboot.

sudo apt-get update
sudo apt-get -y upgrade
sudo reboot

Then install Samba on it:

sudo apt-get -y install samba

What Samba gives me is the ability to see the PI`s hostname when I scan the network.

Alon Or
  • 101