Enable SSH before first boot

Post Reply
pask876
Posts: 6
Joined: Thu Jun 06, 2019 4:37 am
languages_spoken: english, italiano
ODROIDs: N2
Has thanked: 6 times
Been thanked: 0
Contact:

Enable SSH before first boot

Post by pask876 »

As I do not have a usb keyboard,
is there a way to instruct the OS to boot with ssh server enabled on the very first boot?

In Raspbian, for example, to enable SSH on a fresh image for a headless start, you can create a file named "ssh" in the /boot/ directory. Is there a similar way with the n2 board too?

Thank you,
P-

User avatar
tobetter
Posts: 5526
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 222 times
Been thanked: 649 times
Contact:

Re: Enable SSH before first boot

Post by tobetter »

I think SSH is enabled by default on most Debian/Ubuntu images for ODROID?
These users thanked the author tobetter for the post:
pask876 (Thu Jun 06, 2019 10:35 pm)

User avatar
odroid
Site Admin
Posts: 34922
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 957 times
Been thanked: 773 times
Contact:

Re: Enable SSH before first boot

Post by odroid »

Our Ubuntu image shuts down automatically just after rootfs resizing and SSH initialization in the first booting process.
You have to unplug the DC cable and plug again to start the system.
Then, you can access your N2 via SSH connection by default.
These users thanked the author odroid for the post:
pask876 (Thu Jun 06, 2019 10:35 pm)

elatllat
Posts: 1779
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2, C4, N2+
Has thanked: 47 times
Been thanked: 114 times
Contact:

Re: Enable SSH before first boot

Post by elatllat »

All images I have seen for odroid have ssh, but if you find one without you can boot of other media and edit your ssh-less-img with chroot.

fonix232
Posts: 33
Joined: Sun Nov 12, 2017 9:47 pm
languages_spoken: English
ODROIDs: N2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Enable SSH before first boot

Post by fonix232 »

odroid wrote:
Thu Jun 06, 2019 8:52 pm
Our Ubuntu image shuts down automatically just after rootfs resizing and SSH initialization in the first booting process.
You have to unplug the DC cable and plug again to start the system.
Then, you can access your N2 via SSH connection by default.
Could the power plug pull be avoided in the future?

User avatar
odroid
Site Admin
Posts: 34922
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 957 times
Been thanked: 773 times
Contact:

Re: Enable SSH before first boot

Post by odroid »

No.
To reduce some uncertain negative side effects, we have no plan to change the behavior of the first booting process.

mad_ady
Posts: 8333
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 574 times
Been thanked: 439 times
Contact:

Re: Enable SSH before first boot

Post by mad_ady »

@fonix232: If you mount the image before you flash it (or the card before the first boot, you can edit /aafirstboot and comment out the first call to shutdown. It should be safe. Or replace it with a reboot.

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 0 guests