1

Was going through the SSH key pair generation and did tried with the few systems i have. refer to the below command and the thumbprint value post key pair generation.

$ ssh-keygen.exe -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/user/.ssh/id_rsa): ./temp
./temp already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in ./temp.
Your public key has been saved in ./temp.pub.
The key fingerprint is:
SHA256:E5wTTU48K+MPU5TUhBB62L/tYGfpWrb4KysfVrPajhs user@localhost
The key's randomart image is:
+---[RSA 3072]----+
|        +B+=.    |
|       = =B .    |
|      o B..o     |
|       .o+o      |
|       .S+. o    |
|        +. + +   |
|         +E O    |
|        .oo/ .   |
|         oOBO.   |
+----[SHA256]-----+

Is it possible to generate same ssh key pair on multiple systems?

If yes how can same key pairs can be generated.?

what are other parameters ssh-keygen uses which are specific to that system.?

1
  • (OpenSSH) ssh-keygen doesn't have any parameters specific to the system it runs on. Mostly it uses random data that is different on every invocation, by design. It has some parameters that depend on the OpenSSH version, and while different systems sometimes have different versions of OpenSSH, no system has a version unique to itself. Dec 20 '20 at 3:01
1

Is it possible to generate same ssh key pair on multiple systems?

No. That would not be secure. The key pair should be unique, and are made in a fashion that attempts to ensure this. As no communication happens during generation, no hard guarantee can be made, but they can be big enough that the chance of a collission is essentially zero.

To have the same keys multiple places, copy them. They are plain text files, which can be copied. But a better alternative would probably be to generate one key pair per system, and all desired public keys to the hosts you connect to. That way, you can revoke a single key pair if you loose control of it's private key.

3
  • Agree it will not be secure. how can i generate one such (Same ssh-key pair from multiple machines) for my test purpose.? can this be realized by any options of ssh-keygen utility.?
    – manju.g.r.
    Dec 19 '20 at 15:14
  • One more to add, am using the key pair for signing the data and not for system access over SSH.
    – manju.g.r.
    Dec 19 '20 at 15:21
  • manju: there is no way to do this with OpenSSH; that project is zealous (some would say fanatic) about security and regularly rejects any feature that is or too easily could be insecure, even if useful (which your feature isn't) -- e.g. their semi-removal a few years ago of DSS-aka-DSA. Dec 20 '20 at 3:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.