61 votes

I got "BEGIN PGP PUBLIC KEY BLOCK" attached to an email and I don't know what it is

This is the PGP public key belonging to (presumably) the email's author. Its primary uses are: to encrypt messages that you're sending to the key's owner (i.e. email privacy); to verify digital ...
u1686_grawity's user avatar
58 votes
Accepted

Are GPG and SSH keys interchangable?

I know this is an old post, but for people like me stumbling over this: It is now (since gpg 2.1) possible to simply extract ssh keys directly using gpg: gpg --export-ssh-key <key id>!. The ! ...
wwerner's user avatar
  • 695
31 votes

Git SSH "permission denied" in macOS 13 Ventura

You need to generate a new set of keys based on a more secure hash algorithm. It is generally recommended to use ed25519 algorithm. ssh-keygen -t ed25519 -C [email protected] ssh-add -A In case you ...
bumfo's user avatar
  • 449
21 votes
Accepted

How do I use the openssl command to decode a certificate/public key .PEM file?

If you want to view a public key in PKCS#1 format, you can use: openssl rsa -pubin -in <file> -text
garethTheRed's user avatar
  • 4,084
18 votes

What is the difference between the .pem and .pub and non suffixed ssh credentials files?

.pub file format is used by SSH for public key store, this key need to share with a Server. .pem(Privacy Enhanced Mail) is a base64 container format for encoding keys and certificates. .pem download ...
Premraj's user avatar
  • 2,236
18 votes
Accepted

How to find public key of the server using any SFTP/SSH client

The only correct way is to ask the server administrator to provide you the host key. If you retrieve the host key remotely yourself, you cannot really trust the key, as you can be under a Man-in-the-...
Martin Prikryl's user avatar
18 votes

How to check if a GPG encrypted file is encrypted using a specific public key?

Some behavior has changed in newer versions of gpg (I'm testing on gpg v2.2.4). It prompts you for the passphrase when doing --list-packets. And now by default, -k doesn't show the key IDs anymore, ...
wisbucky's user avatar
  • 3,086
16 votes
Accepted

OpenSSH public key file format?

So there seems to be undocumented fields in the public key file. The RFC does not appear to refer to other documents for the definitions of the fields. They are defined in RFC 4251 "The Secure ...
u1686_grawity's user avatar
15 votes

I got "BEGIN PGP PUBLIC KEY BLOCK" attached to an email and I don't know what it is

It's harmless, and possibly useful. Users of PGP (Pretty Good Privacy) (and other similar apps) send a 'public key', such as you saw in the message, so folks who have the key for that user can verify ...
K7AAY's user avatar
  • 9,623
14 votes

How do I use the openssl command to decode a certificate/public key .PEM file?

how do I use the oppenssl command to decode it into a list of human-readable fields. openssl x509 -in NAME.pem -text -noout Replace 'NAME' with whatever filename your .pem file has.
fuzzydrawrings's user avatar
13 votes
Accepted

How to list trust level of OpenPGP public keys in GnuPG?

You can export all configured owner trust through gpg --export-ownertrust. The output is of the form FINGERPRINT:TRUST: For my own key (which has ultimate trust on my machine), there is following ...
Jens Erat's user avatar
  • 17.9k
13 votes
Accepted

SSH proxyjump with identityfile in the proxy only

[...] is it possible to keep the privkey in the proxy and reference it in the PC so I don´t have to move it to the PC? Short answer: No Reason: All config file (or command-line) references on your ...
crimson-egret's user avatar
13 votes
Accepted

Git SSH "permission denied" in macOS 13 Ventura

macOS 13 (Ventura) ships with OpenSSH_9.0p1. According to the OpenSSH release notes: This release disables RSA signatures using the SHA-1 hash algorithm by default. This change has been made as the ...
Haozhe Xie's user avatar
  • 1,249
13 votes
Accepted

Nginx without public certificate

Your question (and justification) for the question as asked don't really make much sense technically. I can make some statements which I hope may be helpful to you - To configure NGinx without a ...
davidgo's user avatar
  • 70.7k
11 votes

No supported authentication methods available in FileZilla

I had similar issue error was Error: Disconnected: No supported authentication methods available (server sent: publickey) Ans: Simply go to filezilla-Edit-settings-sftp-Add key file--add your ppk ...
rohit dixit's user avatar
10 votes

How to check if a GPG encrypted file is encrypted using a specific public key?

You don't even have to have the public key (just know it's ID). Assuming that someone wasn't purposefully hiding the keys used to encrypt a file/message, then you can use the list-packets command to ...
Ruscal's user avatar
  • 614
10 votes

Nginx without public certificate

... but all the API client (whitelisted clients) should SSL-pinning the public certificate within their Apps, instead of getting the certificate adhoc per request. So we don't need the nginx to ...
Steffen Ullrich's user avatar
9 votes
Accepted

extracting a public key from an Ed25519 private key with OpenSSL?

The formatting is identical to the RSA command, but uses the pkey command instead: openssl pkey -in private.pem -pubout -----BEGIN PUBLIC KEY----- ...
Richie Frame's user avatar
  • 1,940
7 votes

Git SSH "permission denied" in macOS 13 Ventura

This solution works for me. (Backup ~/.ssh/ folder) If your ssh config and private/public keys are in /etc/ssh/ before upgrading the MacOS copy ssh_config to ~/.ssh/config copy all private/public ...
Phu Mai's user avatar
  • 71
5 votes

Error 'Permission denied (publickey,password)'

You probably have set PasswordAuthentication no in /etc/ssh/ssh_config on the machine where you start ssh. This file is used for outgoing ssh connections. The same setting also exists in /etc/ssh/...
Michael Dreher's user avatar
5 votes
Accepted

Why is ssh ignoring my ~/.ssh/config? Cannot commit to github

You're not calling to connect to the host you've defined in your config. Use ssh gh not ssh .... [email protected] But why? - See below: [mpenning@mudslide .ssh]$ ssh -F ./config [email protected] ...
djsmiley2kStaysInside's user avatar
5 votes
Accepted

I've generated a public key: 2976 bits ...?

The .pub file contains a base64 encoded version of your key as well as some additional information, which leads to seemingly more than 2048 bits, due to the encoding overhead.
DerFlob's user avatar
  • 86
4 votes

How can I export public keys in PEM format with GnuPG?

You need gpgsm. To clone the keys from the gpg keystore to the gpgsm keystore, check this comment. Copying the solution here $ gpg --list-secret-keys --with-keygrip $ gpgsm --gen-key -o temporary....
petko's user avatar
  • 41
4 votes
Accepted

Who generates the keys?

It doesn't matter who generates the public/private key pair (as long as key generation and handling is done properly). What matters is the confidentiality of the private key. It is easier to ...
techraf's user avatar
  • 4,902
4 votes
Accepted

Could not load key file. File 'id_rsa.pub' could not be loaded or does not contain a private key. - File Zilla

Realized that it needed a private file (key) to be given for setting up SFTP connection. ~/.ssh/id_rsa is the private file ~/.ssh/id_rsa.pub is the public file One has to use the private file for ...
Chaitanya Bapat's user avatar
4 votes

Decrypt SSL traffic with the openssl command line tool

I'm not entirely sure but I think the answer is no. The openssl command line client is a heterogeneous collection of tools. The X.509 commands can be useful to manipulate certificates, but the ...
Gilles 'SO- stop being evil''s user avatar
4 votes
Accepted

Differences between ssh-keygen private keys and libressl's?

TLDR: there are many different formats for privatekey files And it depends partly on the version of OpenSSH, which you didn't give. Historically, except for long-obsolete protocol version 1 (and ...
dave_thompson_085's user avatar
4 votes

OpenSSH keys file cannot be UTF-16 formatted - prev: Windows (10) OpenSSH (Microsoft's flavour) refuses to accept all popular Public Key Algorithms

The keys are not the problem. I have used the echo '<key>' > <key-file> PowerShell command to copy the public key, the created file text format was UTF-16 LE which I have not figured ...
grekd's user avatar
  • 71
3 votes

Who generates the keys?

It depends. The server admin can generate you a new public/private key and send them to you. In the same time he will configure your public key as authorized to log on the server. The security ...
nex84's user avatar
  • 643
3 votes
Accepted

Can PGP messages be verified with just the fingerprint of the public key?

The fingerprint is like the serial number - the unique identifier - of a key. It's used to check that both parties are talking about the same key, in case there are multiple people with the same name ...
Ben N's user avatar
  • 41k

Only top scored, non community-wiki answers of a minimum length are eligible