K
K
ks_ks2012-06-12 21:45:19
SSH
ks_ks, 2012-06-12 21:45:19

ssh id_rsa id_rsa.pub - how is authorization done?

Please clarify this point. Here we put the keys in the $ ~/.ssh directory .
We register these keys in authorized_hosts on the remote machine (namely, the one that is public (.pub)).

After this process, we happily log in without a password to the remote machine.

But what if we have a need to create 1, 2… 10 more new places,
where we will have to log in under different keys, and different names - what to do here?

Is there any mask like: $ ssh [email protected] --key=... ?

In the end, is it possible, and how to directively specify which key belongs to which login?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vlad Zhivotnev, 2012-06-12
@inkvizitor68sl

ssh -i some_id_file [email protected]
If in .ssh/config, then
Host somehost
IdentityFile id_file
In general, one key can be used for several machines.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question