Can't connect via SSH after first startup

Which system do you use? Android, Ubuntu, OOWOW or others?


Which version of system do you use? Khadas official images, self built images, or others?

Both Official and Self built Ubuntu image

Please describe your issue below:

After having burnt the image on the sd-card I insert the sd-card into the VIM1 and powered it ON. The VIM1 is connected on my LAN and I can correctly see its IP address but every time I try to connect to it I got “connection refused”. The LED on the VIM1 is slow heartbeat white

How do I connect via SSH if I’ve no mouse/keyboard/display?

Hi @NicoCaldo

If the firewall is excluded (the port is closed), the SSH service is probably inactive.

$ service ssh status            // Check the SSH service status
$ service ssh start              //Starting the SSH Service

TTL to USB converter adapter on the linux debug port. Connect to that using GTKTerm.
Then while connected to the target board

$ip route

After getting your ip address of the target go to and open a terminal on the host.
Replace the ip with what you have, hostname leave off the <> it does need the " and make sure that you have >> not >.

$ sudo -i
#echo " <hostname> <hostname.local>" >> /etc/hosts

Make sure that ssh is on in the target as stated in the post by

$sudo systemctl status ssh

Now you can ssh into it from your host

$ssh <hostname>

All of this assumes you are using Debian or Ubuntu desktop for the host.
If you only have a windows box let us know and we will help you set up virtual box with a Ubuntu host VM.

1 Like

Is there a way to make it start automatically after having booted the image I’ve burnt on my as card?

Also, how I know the firewall is up?

I would prefer to not to buy additional hardware.

With my raspberry I was to able to directly connect from my pc to the board using an ethernet cable. Is there something like that I can do?

EDIT yeas I’m using Ubuntu. Edited my first post

Hi, friend.Does this mean running SD card firmware after booting :laughing:(The SD card has the highest priority, so it runs the firmware on the SD card after a reboot)

$ sudo ufw disable        //Disabling the Firewall
$ sudo ufw status        //Checking Firewall Status

I mean, I would like to connect via SSH to my board after having loaded Ubuntu from the SD card but without a mouse/keyboard/monitor.

The step I’ve followed are:

  • burnt the Ubuntu image on the SD card
  • attached the SD card to the board
  • connected the board via ethernet to my LAN on my router
  • turned on the board (LED heartbeat white)

Now, I can’t connect via SSH because I’m recieving the connection refused message so, I can’t launch command on the terminal as I CANNOT connect to the board

How I connect with SSH without additional hardware and just with the board connected to power and LAN?

Hi @NicoCaldo
You are advised to use the official firmware.

You don’t need to do any configuration and just with the board connected to power and LAN.Here’s an example.

lihao@lihao-OptiPlex-7060:~$ ssh khadas@
khadas@'s password: 

Welcome to Fenix 1.2 Ubuntu 22.04.1 LTS Linux 5.4.180  
 _  ___               _            __     _____ __  __ _ ____  
| |/ / |__   __ _  __| | __ _ ___  \ \   / /_ _|  \/  / / ___| 
| ' /| '_ \ / _` |/ _` |/ _` / __|  \ \ / / | || |\/| | \___ \ 
| . \| | | | (_| | (_| | (_| \__ \   \ V /  | || |  | | |___) |
|_|\_\_| |_|\__,_|\__,_|\__,_|___/    \_/  |___|_|  |_|_|____/ 

 * Website:
 * Documentation:
 * Forum:

Last login: Tue Dec 20 00:25:28 2022 from

1 Like

Thanks, I gonna try!

Can I do the same connecting directly the board to my PC via ethernet?

On your host machine

$ip route


$sudo apt install nmap

After that finishes you can do a subnet wide ping to find the vim3.
Vim3 factory image with 4.9 kernel the firewall is off by default so you can ping it.
Connect your vim3 to a network switch / your internet modem.

On your host

This assumes you are on subnet 0, if not change it to what you found in ip route.

$nmap -sn

It will take a couple of minutes for the scan to complete

Now you have the ip of the vim

On the host connect to the target board with the ip address you discovered using nmap


I still have connection refused doing

ssh khadas@

on my VIM1 vim1-ubuntu-20.04-server-linux-5.18-fenix-1.1.1-220725.img.xz

My guess it’s the port/SSH is closed/closed on VIM1 as I’m able to connect to other devices via SSH on my LAN

Might try to install the older 4.9 kernel to verify the connection is working.

Default UFW is off, and on the later kernels it does not work so we had to reconfigure the kernel to get it to work. Pretty sure its not blocking the connection

Some times the SD cards act flaky. Does the board have a heartbeat LED working?

Also, when you nmap did it return hostname along with IP?
Double check that you have the correct device.

You might have to find an hdmi monitor, without using the debug port or monitor it is making finding a solution difficult.
Since it did come back with an IP it must be running or username is not khadas

Connecting a monitor I’ve seen that for some reason the VM1 always loads the pre-installed Android, even if I’ve burnt Ubuntu on the SD card.

The SD card I’m using is a class 4 micro SD HC from Sandisk 16Gb

Those are good cards.

I recall when we first got the Vim1 that it did not want to let android go. Now with a monitor connected put krescue on a SD and load the image with that. It will write directly to emmc and wipe out android. Krescue is worth keeping on a spare SD card.

But if VIM1 is supposed to boot first from the SD card. why I need to clear the emmc with another FW.
Also, point 4 of this guide says

  1. Use Khadas TST to boot into MaskROM mode.
    Problem is the link doesn’t work.
    What’s MaskROM mode?

Hi @NicoCaldo
Please check that your VIM1 can recognize the SD card
Whether the firmware was successfully burned to the SD card

Please check that your VIM1 can recognize the SD card

How can I do that? Do I attach the SD card to the VIM1, turn it on with Android and check if I can access it via Android?

Whether the firmware was successfully burned to the SD card

I’m doing it with BalenaEtcher on Windows and it correctly complete the procedure. I got the “flash correctly” message at the end


Yes, please check

1 Like

On first startup VIM1 runs Android directly from its EMMC. Even if you correctly burn an Linux Ubuntu/Debian image, the one that Khadas provide, VIM1 with Android doesn’t boot the USB but directly boot from EMMC

I was able to wipe the EMMC and install Ubuntu on it as explained here

After that I was able to connect via SSH using khadas@

With Ubuntu running the white LED flash in an heartbeat fast mode (with Android it has an heartbeat slow mode)

1 Like