Enable SSH before first boot

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

Enable SSH before first boot

Unread post by pask876 » Thu Jun 06, 2019 5:21 am

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: 3528
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: 24 times
Been thanked: 95 times
Contact:

Re: Enable SSH before first boot

Unread post by tobetter » Thu Jun 06, 2019 8:14 am

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: 31099
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 31 times
Been thanked: 153 times
Contact:

Re: Enable SSH before first boot

Unread post by odroid » 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.
These users thanked the author odroid for the post:
pask876 (Thu Jun 06, 2019 10:35 pm)

elatllat
Posts: 1320
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 2 times
Been thanked: 12 times
Contact:

Re: Enable SSH before first boot

Unread post by elatllat » Fri Jun 07, 2019 3:53 am

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: 9
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

Unread post by fonix232 » Tue Jun 11, 2019 9:44 pm

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: 31099
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 31 times
Been thanked: 153 times
Contact:

Re: Enable SSH before first boot

Unread post by odroid » Wed Jun 12, 2019 9:13 am

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

User avatar
mad_ady
Posts: 6046
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 107 times
Been thanked: 67 times
Contact:

Re: Enable SSH before first boot

Unread post by mad_ady » Wed Jun 12, 2019 2:48 pm

@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: deuteragenie and 1 guest