https://turingpi.com logo
#│forum
Kubernetes Setup - SSH Login not posible
# │forum
a

appinteractive

04/19/2023, 11:03 AM
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

kathy.auteberry

04/19/2023, 11:13 AM
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

appinteractive

04/19/2023, 11:14 AM
found the issue, I for some reason needed to run ssh with
sudo
never had to do that before
k

kathy.auteberry

04/19/2023, 11:15 AM
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

appinteractive

04/19/2023, 11:17 AM
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

kathy.auteberry

04/19/2023, 11:22 AM
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

appinteractive

04/19/2023, 11:41 AM
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