SSH connection at first boot on raspberry pi

Ask questions about Arch Linux ARM. Please search before making a new topic.

SSH connection at first boot on raspberry pi

Postby sanjibukai » Thu Mar 24, 2016 4:13 pm

Hello,

I have some debian experience regarding the linux universe..
I'm using debian on a macbook air and I'm also playing around for a while with debian (raspbian) on a raspberry 1 model B (yes the first version even before the B+)
But for a long time I wanted to start to play on the next level i.e. with arch linux..

But before going with the desktop (the macbook air) I tried with the raspberry following (check the installation tab) this very concise tutorial

After doing all the steps I plugged the ethernet and I try to log in with SSH.
I was unable to login with the "alarm" login but I did login with the "root" user..
(After loged in I checked the passwd file in /etc/ and I noticed that there was no alarm user, but this is not important..)

The first thing I did was to make a system update, then installing python in order to perform the following benchmark by executing the python script.
After running many bench, I then shutdown the raspberry...
But I never suceed to login again using SSH (i.e. $ ssh root@192.168.1.15 )

Can anyone explain what happen ?

I saw on some forums that openssh should be installed and some configuration like $this->bbcode_second_pass_code('', 'PermitRootLogin yes')
But why it works the first time ?

I plan to restart the installation of arch from scratch but I want to know what happen...
Also, anyone know if it is possible to install archlinux using an image insteed of downloading everytime as it does in the tutorial.

Thank you again and excuse me for my poor english..


NB : Since I have two raspberry 1 model B, I did the test on both rasp, one under raspbian and the other under archlinux...
I expected to get best results with the archlinux one, since I installed nothing except python..
But after many runs I come up to the following result (average) :
raspbian in 6 min 15 s
archlinux in 7 min 45 s
Do I made my arch linux install wrong ?
sanjibukai
 
Posts: 3
Joined: Thu Mar 24, 2016 4:10 pm

Re: SSH connection at first boot on raspberry pi

Postby Abzie » Thu Mar 24, 2016 6:14 pm

Mount the SD card on your pc and edit /etc/ssh/sshd_config to "PermitRootLogin yes"

I guess the update overwritten the config which now defaults to "PermitRootLogin prohibit-password"

See viewtopic.php?f=3&t=9163
Abzie
 
Posts: 29
Joined: Tue Mar 15, 2016 6:05 pm

Re: SSH connection at first boot on raspberry pi

Postby WarheadsSE » Thu Mar 24, 2016 11:07 pm

log in as alarm, then su to root, and then viola. Do as you please. Root ssh login with a password is disabled by default from the openssl project, which then transitioned into Arch.

And no, the configuration file would not have been overwritten in an update.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: SSH connection at first boot on raspberry pi

Postby Abzie » Thu Mar 24, 2016 11:34 pm

$this->bbcode_second_pass_quote('', '.')..unable to login with the "alarm" login but I did login with the "root" user..


Maybe start from scratch.
Abzie
 
Posts: 29
Joined: Tue Mar 15, 2016 6:05 pm

Re: SSH connection at first boot on raspberry pi

Postby sanjibukai » Mon Mar 28, 2016 5:26 am

$this->bbcode_second_pass_quote('Abzie', 'M')ount the SD card on your pc and edit /etc/ssh/sshd_config to "PermitRootLogin yes"

I did the modification and it worked.. I am able to login again as root

$this->bbcode_second_pass_quote('WarheadsSE', 'l')og in as alarm, then su to root, and then viola. Do as you please. Root ssh login with a password is disabled by default from the openssl project, which then transitioned into Arch.

I don't know why but there is no extra user.. Once logged in as root I check the /etc/passwd file and indeed there is no user.. As I said I follow the tutorial available here, maybe the alarm user in no longer available in the "installation image" (I said image but it seems that the file is not really an image, right?)
But I added a new user now..

$this->bbcode_second_pass_quote('WarheadsSE', 'A')nd no, the configuration file would not have been overwritten in an update.

So I would like to know what happened, do you have ideas?

Nevertheless, thank you both for your answers!

I will now investigate why my raspberry with the arch distro is so slow as unexpected for this "lightweight" distro...
sanjibukai
 
Posts: 3
Joined: Thu Mar 24, 2016 4:10 pm
Top

Re: SSH connection at first boot on raspberry pi

Postby WarheadsSE » Mon Mar 28, 2016 3:40 pm

I just downloaded the tarball, extracted, and it is present.

Do you have a squid cache in place? Download this http://fl.us.mirror.archlinuxarm.org/os ... tfs.tar.gz

It is where the symlink points to, but you might have a cache handler that is messing with you.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: SSH connection at first boot on raspberry pi

Postby sanjibukai » Mon Mar 28, 2016 5:03 pm

Thank you very much.
Interesting I didn't notice that this is an archive that it is possible to browse and view the file..
Very interesting (Really I love this *nix world ;-)
I check in mine downloaded file (250.6 Mb) and here is the content of the passwd file..
$this->bbcode_second_pass_code('', 'root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/usr/bin/nologin
daemon:x:2:2:daemon:/:/usr/bin/nologin
mail:x:8:12:mail:/var/spool/mail:/usr/bin/nologin
ftp:x:14:11:ftp:/srv/ftp:/usr/bin/nologin
http:x:33:33:http:/srv/http:/usr/bin/nologin
uuidd:x:68:68:uuidd:/:/usr/bin/nologin
dbus:x:81:81:dbus:/:/usr/bin/nologin
nobody:x:99:99:nobody:/:/usr/bin/nologin
systemd-journal-gateway:x:191:191:systemd-journal-gateway:/:/usr/bin/nologin
systemd-timesync:x:192:192:systemd-timesync:/:/usr/bin/nologin
systemd-network:x:193:193:systemd-network:/:/usr/bin/nologin
systemd-bus-proxy:x:194:194:systemd-bus-proxy:/:/usr/bin/nologin
systemd-resolve:x:195:195:systemd-resolve:/:/usr/bin/nologin
systemd-journal-remote:x:998:998:systemd Journal Remote:/:/sbin/nologin
systemd-journal-upload:x:999:999:systemd Journal Upload:/:/sbin/nologin')

Nevertheless I will do as you said..
I'm downloading the file..
I suppose that I should follow the same tutorial ie. running the following command on this file:
$this->bbcode_second_pass_code('', 'bsdtar -xpf ArchLinuxARM-2016.03-rpi-rootfs.tar.gz -C root')
Am I right ?
I ask this very noob question since I saw rootfs in the filename and I wonder if there is something particular regarding the boot partition..
In any case I will try by myself..
Thank you again...
The next step will be to understand why my raspberry with this arch distrib is so slow comparing to the raspbian one...
sanjibukai
 
Posts: 3
Joined: Thu Mar 24, 2016 4:10 pm


Return to User Questions

Who is online

Users browsing this forum: No registered users and 7 guests