1

I have a new Raspberry Pi 3 B 1.2 and I am trying to SSH into it. I don't have a monitor or an HDMI cable. I have already etched the img file with Raspberry Stretch onto a 64 GB SD card using Etcher.io and I have also already put a file called ssh in boot.

I have tried three approaches:

  1. Connecting from mobile phone (Termux) over SSH via wifi.
  2. Connecting from laptop with Ethernet cable to Ethernet port of Rpi.
  3. Making a USB tethering connection from the mobile phone and connecting over USB

Each connection fails. Please advise me how I can resolve the issue and finally connect over SSH to the Rpi

Approach 1. Connecting from mobile phone (Termux) over SSH via wifi.

Probably fails because this is a shared router which I cannot access physically. The pi does not show up in the network scan, even after I add a wpa_supplicant.conf file.

Approach 2. Connecting from laptop with Ethernet cable to Ethernet port of Rpi

Fails for unknown reason. When I use SSH in terminal I get as far as to password prompt but the standard password (raspberry) is not working with a permission denied error. Yes, I have already put a file called ssh in the boot directory.

Approach 3. Making a USB tethering connection from the mobile phone and connecting over USB.

When I try to connect with SSH from Termux on the phone I get a connection timed out or network is unreachable error.

Please advise.

Update: On the computer I cannot find the IP address of the Rpi. On the phone I get a connection timeout when I try to make an SSH connection after USB tethering.

Vesa
  • 247
  • 1
  • 2
  • 11
  • It may be best if you ask one question and give full details rather than three questions with insufficient information. Could you edit your question and cut & paste the dialogue for approach 2? – joan Dec 01 '17 at 12:53
  • No, I want to be able to connect to the Rpi over SSH and this is information about what I have tried already. There is only one question and then information about what has not worked. The question is therefore properly formatted already and posted in accordance with guidelines. – Vesa Dec 01 '17 at 12:57
  • This might sound stupid but have you tried to connect the RPI to the ethernet, also i remember from the pi 2B i sometimes had to reinstall open-ssh server, might be my mistake but try it! – patrick Dec 01 '17 at 13:26
  • Hello @patrick. I have tried to put an ethernet cable between the laptop and the rpi. I don't have a router at the moment. You have to understand that there is no reinstallation of anything if I cannot access the device through SSH in the first place. – Vesa Dec 01 '17 at 13:37
  • What operating system is on the laptop? And if you could post the output of ssh -vv pi@raspberrypi.local ... that would probably be very helpful. – RubberStamp Dec 01 '17 at 14:28
  • Everything looks normal on the debugging output... you left out the critical section... i.e. what happens when you enter a password... pi@raspberrypi.local's password: debug2: we sent a password packet, wait for reply debug1: Authentication succeeded (password). – RubberStamp Dec 01 '17 at 14:48
  • 1
    When I read the post it was unclear how you got the IP address. But if you did ssh pi@raspberrypi.local then it seems Bonjour/zeroconf is working. /home/xx/.ssh: ahh, just realized okay if local user is xx, target user pi.. When you said you got Permission Denied, it seemed you might have been compromised by a Pi ssh-targeting botnet, see /var/log/auth.log on the SDcard to check. When tethering via your phone hopefully it wasn't in DMZ mode? – jdonald Dec 01 '17 at 17:08
  • Hello @jdonald. So I don't think I have the right IP address for the raspberry pi. SSH pi@raspberrypi.local also does not work. I don't think I have been compromised because I am never able to connect via SSH even if I burn the image again. – Vesa Dec 02 '17 at 07:13
  • What is the IP address of your Ubuntu PC? ip -4 address ... is the IP address of your Ubuntu PC 10.42.0.1 – RubberStamp Dec 02 '17 at 14:44
  • Your question has morphed into... "I'm trying to connect to the RPi from my phone." ... I agree with @joan ... pare back your question to one and one only connection option, and ask a specific and clear question. – RubberStamp Dec 02 '17 at 15:27
  • @rubberstamp. Nope. The question is still how can I connect to my Rpi using SSH. Of course there is a specific way that we are all trying to find, just like people are always suggesting various approaches on stackexchange until a useful solution is found. We are supposed to find a specific useful solution in the end but the question remains exactly the same. – Vesa Dec 03 '17 at 00:44

1 Answers1

1

On newer versions of Raspbian, the SSH service is turned OFF by default for security purposes. This is a good thing, but it causes you to have to go through one extra step before booting it up:

  • After you create the fresh Raspbian image on the SD card, go into the root of that card.
  • Create a new file called ssh in that folder. It doesn't matter if it has any data in it, the existence of the file is what counts here.
  • If you need to, update the /etc/wpa_supplicant/wpa_supplicant.conf with your Wifi SSID and network password (which you say you've already done, so this is good).
  • Stick the card into the Pi and boot it. You should see it show up in the DHCP logs of your router or DHCP server. From that info you will know the IP address it has been assigned.

For a detailed and well written full tutorial, check THIS WEB PAGE.

Good luck!

MrChips
  • 993
  • 1
  • 5
  • 11