gibt es ein putty-keygen - tool in linux?

Unser Off Topic Bereich. Alles was nicht zu Manjaro Linux gehört findet hier seinen Platz!
Antworten
Benutzeravatar

Themen Author
malaga
Forum Kenner
Forum Kenner
Beiträge: 101
Registriert: Freitag 20. Juli 2018, 16:20
GPU:
Kernel:
Desktop-Variante:
GPU Treiber:
Hat sich bedankt: 2 Mal

gibt es ein putty-keygen - tool in linux?

#1

Beitrag von malaga »

hallo u. guten  Morgen,

gibt es ein putty-keygen - tool in linux?


Hintergrund:  ich will gerne Keys vergleichen - das allerdings klappt mit den Methoden die ich unten zitiere nicht 100 %.

How to check if an RSA public / private key pair match
https://serverfault.com/questions/42639 ... pair-match

I have two files, id_rsa and id_rsa.pub. What command can be used to validate if they are a valid pair?
would prefer the ssh-keygen -y -e -f <private key> way instead of the accepted answer of How do you test a public/private DSA keypair? on Stack Overflow.

ssh-keygen -y -e -f <private key> takes a private key and prints the corresponding public key which can be directly compared to your available public keys.  (Hint: beware of comments or key-options.) (How the hell is it doing that? I can only hope the public key is encoded directly or indirectly in the private key...)

I needed this myself and used the following Bash one-liner.
It should output nothing if the keys belong together.

Apply a little -q to the diff in scripts and diff only sets the return code appropriately.

PRIVKEY=id_rsa
TESTKEY=id_rsa.pub

Code: Alles auswählen

diff <( ssh-keygen -y -e -f "$PRIVKEY" ) <( ssh-keygen -y -e -f "$TESTKEY" )
der Bash onleliner liefert bei mir ein leeres ergebnis.
Benutzeravatar

Blueriver
Moderator
Moderator
Beiträge: 2343
Registriert: Donnerstag 19. Mai 2016, 15:49
CPU: AMD Quad Core A8 3,6GHz
GPU: AMD/ATI Radeon R7
Kernel: 6.1
Desktop-Variante: XFCE und KDE Stable, Testing, Unstable
GPU Treiber: Free
Hat sich bedankt: 28 Mal
Danksagung erhalten: 149 Mal

Re: gibt es ein putty-keygen - tool in linux?

#2

Beitrag von Blueriver »

Hallo malaga,

in den Paketquellen ist "putty".
In "putty" sollte auch "puttygen" enthalten sein.
Dieses sollte das sein was du suchst.
Manjaro LXQT und XFCE Stable, Testing, Unstable
CPU: AMD Quad Core A8 3,6GHz
Graka: AMD/ATI Radeon R7
Treiber: Free
Kernel: 4.20
Antworten