M
M
modcode2021-02-28 23:58:44
SSH
modcode, 2021-02-28 23:58:44

SSH permission denied?

603c02e849691083508454.png
Can't add a second key for some reason?
Win10

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Saboteur, 2021-03-01
@saboteur_kiev

what does the second key mean. You are trying to connect using a key that is not authorized on the server.

A
AUser0, 2021-03-01
@AUser0

First, copy the contents of mikrotik/.ssh/.id2_rsa.pub to the file 178.154.249.68:/home/ainar/.ssh/.authorized_keys, and only then try to use this publickey.

G
ge, 2021-03-04
@gedev

If I understood the comment about the second account correctly, then .ssh/config is probably not configured and ssh is trying to log in to account 2 with the key from account 1. If the accounts are on different servers, then set the correspondence between the keys and servers:

Host x.x.x.x
    IdentityFile ~/.ssh/ключ1
Host y.y.y.y
    IdentityFile ~/.ssh/ключ2

If the accounts are on the same server, then respectively for the accounts:
Host x.x.x.x
    User юзернейм1
    IdentityFile ~/.ssh/ключ1
    User юзернейм2
    IdentityFile ~/.ssh/ключ2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question