H
H
hukabuk2019-04-13 23:29:56
SSH
hukabuk, 2019-04-13 23:29:56

How to connect via ssh with a key?

I generated the keys, uploaded the public keys to the server, disabled password authorization. All set up, everything is fine.
Now you need to connect from another computer, dragged the keys there, I try:
ssh -i id_rsa.pub [email protected]
As a result, it waits for a minute, then it turns off Connection timed out
The same with the private key. And in Google I didn’t find any information at all, everywhere it’s just how to set it up, and then how to enter from other computers - they are silent. Is it really necessary to re-generate a key from each computer and add it to the server? Why then -i parameter..

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Shumov, 2019-04-13
@hukabuk

You need to connect using a private key, not a public one. And have rights to it 400

A
Anton, 2017-02-18
@artshelom

What do you mean by "not working"?
Does it give any error in the console? Or is the output different from what you want?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question