I have a display and a USB mouse but don't have a keyboard. I realize that ubuntu asks me to enter new password for the initial user setup. Is there any alternate way to install ubuntu server without keyboard on a Raspberry pi 4? Is it possible to ssh into ubuntu server without initial setup?

  • Ubuntu server comes without a graphical user interface. I need to login first to even get to the desktop. – launchin2space Nov 29 '19 at 12:13
  • you need at least one computer that has a keyboard attached to it and the ability to modify the raspberry sdcard. You need to place a file inside the boot folder of the sdcard. The empty file needs to be named SSH. Now replug it into your raspberry pi. After booting you should now be able to ssh into your pi. – AlexOnLinux Nov 29 '19 at 16:52
  • @AlexOnLinux I do have my laptop, but that method works with Raspian OS and not on anything else. – launchin2space Nov 29 '19 at 17:05
  • I did try this from this website and still no luck. berthon.eu/2017/… – launchin2space Nov 29 '19 at 17:06
  • the default os for raspberry is raspbian. its maintained from the raspberry producers. i suggest you stick to that os. if you do not want a gui just pick the raspbian lite version. i do the same. ubuntu server did not run stable the last time i used it on my pi2 - raspberrypi.org/downloads/raspbian and follow the instructions for a headless install 3. Enable SSH on a headless Raspberry Pi raspberrypi.org/documentation/remote-access/ssh/… – AlexOnLinux Nov 30 '19 at 12:04

The "ssh" file seems to work for me. I just installed the RPi 4 with ubuntu-server 19.10.1. Here are the full instructions for anbody who finds it:

After you have installed ubuntu-server to your SD-card, mount the first partition (usually /dev/mmcblk0p1) on the machine that you installed the SD-card with.

Next, create a file called "ssh" on the filesystem root (it does not have to have any content, as long as the file is there when the pi boots the first time, it will enable ssh).

You then should find the ip address of your pi using either the web-ui on your modem, or by running the following comand from a linux box with nmap installed: nmap -p 22 / (e.g.: nmap -p 22

Now you can ssh into the machine with the username "ubuntu" and password "ubuntu". It will then ask you to change the password and disconnect you. That's it, you should have a new password.

| improve this answer | |
  • I verified this works on Ubuntu Server 64-bit 18.04 LTS on Raspberry Pi 4. Thanks! – ATSiem Apr 15 at 2:14
  • Note: You must add the SSH file before first boot. Tested on Ubuntu Server 64-bit 18.04 LTS on Raspberry Pi 4. Tried to add the SSH file after unsuccessful first boot but had to reflash the card image. – Wirewrap Jun 18 at 20:09
  • @Wirewrap thanks for the extra information (that I did not even know about myself! – Pastulio Jun 21 at 18:28

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.