Answer the question
In order to leave comments, you need to log in
How can I use ssh keys from the machine on which I am a user to connect to the machine on which I need to work as root?
There is a remote machine on which you need to work as root. On my machine, I work as a user, I do ssh-copy-id 192.168.2.3 (I also did ssh-copy-id [email protected]). But when I want to connect, it still asks for the root password. How to make sure that he does not ask? Really users on both hosts should be under one name?
Answer the question
In order to leave comments, you need to log in
All figured out. It was necessary to add the following line to /etc/ssh/sshd_config:
no other parameters in the config can be changed at all.
It is also important to execute the command on the host from which you are connecting:$ ssh-add
did: ssh-copy-id [email protected]
How are you connecting? ssh [email protected] ?
On some systems, remote root access is discouraged, it's better to connect to a remote machine as a user and if absolutely necessary, immediately execute sudo bash by configuring /etc/sudoers so that it does not ask for extra passwords
and do ssh -v [email protected]
to see the log in more detail that's not right there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question