Kubernetes Setup - SSH Login not posible
# │forum
a
Using the https://help.turingpi.com/hc/en-us/articles/8942913487901-OS-setup guide on flashing the CM4 with dietpi for kubernetes, I cant login via SSH at the end. Using
ssh 192.168.178.81 -v
which I configures and is also showing up in the network (host name is not showing correctly in frizbox) and I only getting
Permission denied (publickey,password)
I also tried to use the ssh keys and configured those in the pi imager but with no luck, they are there in the
user_data
file but login is not possible. Any ideas or suggestions?
k
Dumb question but don’t you need to do
ssh dietpi@192.168.178.81
, since your local user likely isn’t called
dietpi
? 🤔
a
found the issue, I for some reason needed to run ssh with
sudo
never had to do that before
k
Well that would… probably try to log you in as
root
on the DietPi, so that also works but only makes me think that my version would also work
(Though disabling
root
login via SSH is always recommended)
a
oh yeah I know... I was desperately dailing down on my security mesures to get that thing finally running at all 😄
will flash it now again with ssh key and try to figure out why the hack I need sudo for ssh now
k
Ah sorry, I think I’m not explaining properly… On DietPi, two* users exist by default,
dietpi
and `root`; by doing
sudo ssh …
, you’re changing your local user to
root
, thus attempting to log in as
root
, which will work If you do just
ssh <ip-address>
, it will try to log in as the same username that you use on your local machine – a username that in all likelihood, doesn’t exist on your DietPi installation. To override the user, you need to call
ssh <username>@<ip-address>
, in your case
ssh dietpi@192.168.178.81
*simplification, shush 🤭
a
thats what I did a 1000 times and it did not work
I set my local user and my ssh pub key in the dietpi.txt + pi imager like in the guide, with no luck
2 Views