OpenSSL/SSH: Difference between revisions

From wiki
Jump to navigation Jump to search
m Hdridder moved page OpenSSL to OpenSSL/SSH: Better covers the content
No edit summary
Line 11: Line 11:
;ssh-keygen -y -f <privatkeyfile>
;ssh-keygen -y -f <privatkeyfile>
:Print the public key for the private key in <privatkeyfile>
:Print the public key for the private key in <privatkeyfile>
;ssh user@target
:SSH into target system as user, if user is omitted the current username is used
;ssh -vvv user@target
:Be very verbose with debug information
;ssh -i keyfile user@target
:Use the key in keyfile to connect

Revision as of 13:40, 19 November 2024

openssl rsa -text -noout -in id_rsa
Print out key attributes (o.a. key length)
openssl s_client -showcerts -connect <system>:<port>
Get the certificates available and test connectivity
openssl x509 -outform der -in <pemfile> -out <filename>.der -text
Convert to DER format.
ssh-keygen -t ed25519
Create a keypair (accept all defaults, put a password if you want)
ssh-keygen -y -f <privatkeyfile>
Print the public key for the private key in <privatkeyfile>
ssh user@target
SSH into target system as user, if user is omitted the current username is used
ssh -vvv user@target
Be very verbose with debug information
ssh -i keyfile user@target
Use the key in keyfile to connect