A
A
Asya2020-08-13 23:03:51
SSH
Asya, 2020-08-13 23:03:51

How to connect via ssh from Windows?

I create a public key:

ssh-keygen -t rsa -f .ssh/id_rsa -C user
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in .ssh/id_rsa.
Your public key has been saved in .ssh/id_rsa.pub.
The key fingerprint is: blablabla


I add it to the authorized keys on the server,

but when I try to connect to the server, I get an error:
ssh [email protected]_ip_here
[email protected]_ip_here: Permission denied (publickey).


what am I doing wrong? how to connect?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2020-08-13
@asyaevloeva

ssh -v [email protected]_ip_here
and see the output.
Possibly private key rights

V
vreitech, 2020-08-13
@fzfx

log in without a key and set the correct owner, group and rights:

chown -R $(whoami): ~/.ssh
chmod 0600 ~/.ssh/authorized_keys
chmod 0700 ~/.ssh

then try again.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question