I have tried to create a headless connection to my (new) Raspberry Pi, since I do not have a HDMI cable at home. However- after trying everthing I have found as suggestions on Google etc.- I just cannot find a solution to my problem.

My Raspberry is on my local network and ssh is activated, which I can see from:

nmap 192.168.x.x
Nmap scan report for 192.168.x.x
Host is up (0.00018s latency).
Not shown: 999 closed ports
22/tcp open  ssh

when I type ssh [email protected], and then type raspberry as password, it says: Permission denied, please try again.

When I type: sudo service ssh status, I get:

Dez 27 21:19:24 fritz-HP-Pavilion-17-Notebook-PC sshd[16244]: Failed password for invalid user pi from 192.168.x.x port 45468 ssh2

Dez 27 21:19:42 fitz-HP-Pavilion-17-Notebook-PC sshd[16244]: Connection closed by 192.168.x.x port 45468 [preauth]

PS.: I use Ubuntu 16.04. and on the Raspberry Pi 3, the operating system is Raspbian

  • 1
    It seems your host PC is Ubuntu...Can you confirm? And are you also using Ubuntu on the RPi? Commented Dec 27, 2017 at 21:45

2 Answers 2


Since it seems that you are using Ubuntu on your host PC, you can inspect the etc/passwd file on the SD card to find out what your username is on the Pi.

cat /media/ubuntu_user/sd_card_partition_2/etc/passwd

You can also check if the default password is what is expected or change the default password by modifying the etc/shadow file on the SD card. The instructions for adding a new user included in the link @Ghanima posted in his comment should work as well.


From your comment, it seems you are trying to install Noobs without a display, perhaps these instructions will work for you. They are a little on the old side, but perhaps they will still work.

My advice would be to download the official Raspbian image which is a lot easier to work with on initial install without a keyboard and monitor.

  • I don't why, but when I navigate to the SD Card: cd /media/user/SETTINGS/, I only see: ll --> drwxr-xr-x 4 root root 1024 Jan 1 1970 cache/ drwx------ 2 root root 12288 Jan 1 1970 lost+found/ -rw-r--r-- 1 root root 56 Jan 1 1970 noobs.conf There is no /etc/passwd... Most likely I'm overseeing something...
    – BeldCode
    Commented Dec 27, 2017 at 22:27

Per updated question: This is the likely solution SSH not working with fresh install

Assuming Ubuntu LTS 16.04 running on the Pi:

The default login username is "ubuntu", password is "ubuntu" for Ubuntu LTS 16.04 (Source).

This is the clue that there is no user pi:

Failed password for invalid user pi from 192.168.x.x

So this is your command to go with:

ssh [email protected]
  • I just tried "ssh [email protected]". However, it still states "Failed password for invalid user ubuntu from port 45794 ssh2". I tried both, "ubuntu" and "raspberry" as possible passwords. Is is possible to connect to my Pi, when I have never been logged into the pi? In other words: Do I have to set some configurations within the Pi, before I can connect headless with the Pi via another machine?
    – BeldCode
    Commented Dec 27, 2017 at 21:20
  • According to this site medium.com/a-swift-misadventure/… ubuntu/ubuntu is right and there needs nothing else to be done to ssh. On the other hand this berthon.eu/2017/… makes much ado about creating an user manually and enabling ssh. Hmm, which is it?
    – Ghanima
    Commented Dec 27, 2017 at 21:42
  • There has been a chip alongside my Raspberry Pi. A 16GB SD Card with an operating system preinstalled. It is the Raspbian OS if I am not mistaken. The author of medium.com/a-swift-misadventure/… flashes Ubuntu 16.04 server minimal on his SD card. I don't know, if Raspbian OS automatically allows ssh headless connection or not...
    – BeldCode
    Commented Dec 27, 2017 at 22:03
  • @BeldCode that changes everything. So you're not running Ubuntu on the Pi but Raspbian. (You need to clarify this in your question, it is key here). In this case this should help: raspberrypi.stackexchange.com/q/58478/19949
    – Ghanima
    Commented Dec 27, 2017 at 22:07
  • I'm sorry I didn't mention that earlier. I had no idea, that it was that important, So, I must enable ssh for my Raspberry Pi 3. In order to do that, I must boot my Pi and set it up, before I can headless connect with it. That means, I must buy a HDMI cable first, right?
    – BeldCode
    Commented Dec 27, 2017 at 22:17

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