M
M
mathrep2021-12-12 11:18:18
SSH
mathrep, 2021-12-12 11:18:18

How to ssh into a server from Ubuntu if Permission denied (publickey).?

Hi.

on ubuntu 20 did sudo ssh-keygen
in /root/.ssh/ id_rsa appeared and id_rsa.pub
gave id_rsa.pub to admin

trying to login sudo ssh [email protected]
gives Permission denied (publickey).

I tried to throw id_rsa in /user/.ssh/ I
tried different ssh [email protected] with and without sudo,

just don’t send it to Google, I was there,

tell me exactly how to enter and what is the problem.

Permission denied (public key).

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey, 2021-12-12
@KingstonKMS

Google was bad - look

A
Alexander Karabanov, 2021-12-12
@karabanov

Of course, sudo won't help here, as the connection will use the root user's environment on your machine, for which there is no key.
Ask the administrator under which user to connect (obviously not under root, as you tried).

S
Saboteur, 2021-12-13
@saboteur_kiev

sudo ssh [email protected]
It is not right. This is very bad.
you need to ssh [email protected]
and already THERE after sudo entered.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question