qiot-project / qiot-covid19-edge-image-build

Apache License 2.0
3 stars 1 forks source link

Login incorrect when I try to log into the new flashed device #2

Open andreabattaglia opened 3 years ago

andreabattaglia commented 3 years ago

I successfully flashed the sd-card image using the fedora-arm-installer command:

sudo fedora-arm-image-installer -y --image=fedora-33-qiot.aarch64.raw.xz --target=rpi3 --media=/dev/sdd --resizefs --addkey=/home/abattagl/.ssh/id_rsa.pub --norootpass --addconsole

In the setup template I can spot the commands creating the user "edge@edge". I tried to access the qiot device in the following ways:

alezzandro commented 3 years ago

I cannot replicate the issue, I ran your same command but I can connect to the rpi through ssh and root user (ssh key) and edge user (with password):

alex@freddy ~/fedora-QIoT-image-builds> sudo fedora-arm-image-installer -y --image=fedora-33-qiot.aarch64.raw.xz --target=rpi3 --media=/dev/sda --resizefs --addkey=/home/alex/.ssh/id_rsa.pub --norootpass --addconsole
[sudo] password for alex: 

 ***********************************************************
 ** WARNING: You have requested the image be written to sda.
 ** /dev/sda is usually the root filesystem of the host. 
 ***********************************************************
 ** Do you wish to continue? (type 'yes' to continue)
 ***********************************************************
 = Continue? yes

=====================================================
= Selected Image:                                 
= fedora-33-qiot.aarch64.raw.xz
= Selected Media : /dev/sda
= U-Boot Target : rpi3
= Root Password will be removed.
= Root partition will be resized
= Console for rpi3 will be added.
= SSH Public Key /home/alex/.ssh/id_rsa.pub will be added.
=====================================================

*****************************************************
*****************************************************
******** WARNING! ALL DATA WILL BE DESTROYED ********
*****************************************************
*****************************************************
= Writing: 
= fedora-33-qiot.aarch64.raw.xz 
= To: /dev/sda ....
4285440000 bytes (4.3 GB, 4.0 GiB) copied, 187 s, 22.9 MB/s
0+411918 records in
0+411918 records out
4294967296 bytes (4.3 GB, 4.0 GiB) copied, 390.737 s, 11.0 MB/s
= Writing image complete!
= Resizing /dev/sda ....
Checking that no-one is using this disk right now ... OK

Disk /dev/sda: 28.79 GiB, 30908350464 bytes, 60367872 sectors
Disk model: SD/MMC          
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xca9f549a

Old situation:

Device     Boot   Start     End Sectors  Size Id Type
/dev/sda1  *       2048 1028095 1026048  501M  6 FAT16
/dev/sda2       1028096 3125247 2097152    1G 83 Linux
/dev/sda3       3125248 8386559 5261312  2.5G 83 Linux

/dev/sda3: 
New situation:
Disklabel type: dos
Disk identifier: 0xca9f549a

Device     Boot   Start      End  Sectors  Size Id Type
/dev/sda1  *       2048  1028095  1026048  501M  6 FAT16
/dev/sda2       1028096  3125247  2097152    1G 83 Linux
/dev/sda3       3125248 60367871 57242624 27.3G 83 Linux

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
e2fsck 1.45.6 (20-Mar-2020)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda3: 42072/164640 files (0.7% non-contiguous), 550522/657664 blocks
resize2fs 1.45.6 (20-Mar-2020)
Resizing the filesystem on /dev/sda3 to 7155328 (4k) blocks.
The filesystem on /dev/sda3 is now 7155328 (4k) blocks long.

= Raspberry Pi 3 Uboot is already in place, no changes needed.
= Removing the root password.
= Adding SSH key to authorized keys.
= Adding console ttyS1,115200 to kernel parameters ...

= Installation Complete! Insert into the rpi3 and boot.
alex@freddy ~/fedora-QIoT-image-builds> 
alex@freddy ~/fedora-QIoT-image-builds> 
alex@freddy ~/fedora-QIoT-image-builds> ssh root@192.168.1.156
The authenticity of host '192.168.1.156 (192.168.1.156)' can't be established.
ECDSA key fingerprint is SHA256:erxFXQX6gJTyvWi7BM1BjNGiAiR1kLxTdNimWOTW+tE.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.1.156' (ECDSA) to the list of known hosts.
Boot Status is GREEN - Health Check SUCCESS
[root@localhost ~]# logout
Connection to 192.168.1.156 closed.
alex@freddy ~/fedora-QIoT-image-builds> ssh edge@192.168.1.156
edge@192.168.1.156's password: 
Boot Status is GREEN - Health Check SUCCESS
Last login: Tue Feb  2 00:00:53 2021
[edge@localhost ~]$ logout
Connection to 192.168.1.156 closed.
alezzandro commented 3 years ago

@andreabattaglia can you please double check it?