A
A
Asparagales2018-11-04 08:12:47
linux
Asparagales, 2018-11-04 08:12:47

How to login to remote server with root account?

Good afternoon.
There is a local computer and a remote server with CentOS 7. There are root and regular user accounts on the local computer. The server also has root and regular user accounts, but with a different name.
First, I connected to a remote server via openSSH with a password. Then I generated a pair of RSA keys, sent the public key to the server, and now I go through key authentication. All this, if you use a command like
ssh [email protected]_name
However, I can not log into the server using the command . An
ssh [email protected]_name
error is thrown:

Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

I looked at the /etc/ssh/sshd_config file on the server - there, among other things, the following values ​​are uncommented: PermitRootLogin
yes
PubkeyAuthentication yes
PasswordAuthentication yes
write root?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Berkutman, 2018-11-04
@Asparagales

vi /etc/ssh/sshd_config
And set
PasswordAuthentication yes
Next
systemctl restart sshd

A
AUser0, 2018-11-04
@AUser0

And a pair of keys for root is stored in root's configs, on both machines? (in local_host:/root/.ssh/id_rsa and remote_host:/root/.ssh/authorized_keys )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question