Questions tagged [private-key]

140 questions
1106
votes
25 answers

How to tell git which private key to use?

ssh has the -i option to tell which private key file to use when authenticating: -i identity_fileSelects a file from which the identity (private key) for RSA or DSA authentication is read.  The default is ~/.ssh/identity for protocol…
jrdioko
  • 12,445
  • 5
  • 27
  • 26
436
votes
18 answers

Windows SSH: Permissions for 'private-key' are too open

I've OpenSSH 7.6 installed in Windows 7 for testing purposes. SSH client & server work just fine till I tried to access one of my AWS EC2 box from this windows. It seems like I need to change the permission on the private key file. This can be…
Sabrina
  • 5,083
  • 8
  • 15
  • 25
151
votes
3 answers

Howto force ssh to use a specific private key?

With ssh -i you can instruct ssh to use an extra private key to try authentication. The documentation is not clear on how to explicitly use only that key.
Herman van Rink
  • 3,639
  • 3
  • 12
  • 10
98
votes
4 answers

Are GPG and SSH keys interchangable?

I want to generate an RSA key in GPG and use it in SSH login. Is this even possible? If so, how? edit: see @wwerner's answer, I didn't try it but it seems to be the current solution (as of 2018)
destan
  • 1,127
  • 1
  • 11
  • 11
71
votes
4 answers

How can I change the comment field of an RSA key (SSH)?

I know I can simply open up the pubkey and change the comment after the ==s, but is the comment field decided upon at creation stored in the private key as well? If so, how can I change that field without generating an entirely new key from scratch?
ELLIOTTCABLE
  • 2,315
  • 3
  • 27
  • 41
37
votes
5 answers

How do you safely backup a GPG private key?

I found a very interesting CLI password manager called pass. To use it, you generate a GPG2 key pair, and use the tool to help you store passwords in gpg2 encrypted files. To encrypt the files (add a new password), it uses the public key. To decrypt…
Tal
  • 473
  • 1
  • 4
  • 6
30
votes
1 answer

GnuPG / OpenGPG: Recovering public key from private key

I know that the public SSH key can be recovered from the private using ssh-keygen -y. How can a (deleted) public key be recovered from the private key in GPG (preferably in a way that is OpenGPG compatible)?
leden
  • 746
  • 1
  • 8
  • 11
30
votes
3 answers

Can't import public key into OSX Keychain

I created a couple of self-signed S/MIME certificates (using OSX Keychain & OpenSSL) and then exported these into 3 files: Certificate (.cer) Private Key (.p12) Public Key (.pem) When attempting to import these back into another Mac, the…
Prembo
  • 401
  • 1
  • 4
  • 6
30
votes
2 answers

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

Running "ssh-keygen -t dsa" generates two files, a private and public key. Its simple enough to comprehend that the private key is used to identify yourself to the outside world, which only sees your public key. However, I've also seen ".pem" files…
jayunit100
  • 611
  • 4
  • 8
  • 18
27
votes
7 answers

No supported authentication methods available in FileZilla

I'm using FileZilla to connect to my SFTP server. But when I'm trying to connect, it gives me this error Error: Disconnected: No supported authentication methods available (server sent: publickey) I have generated a private key with PuTTYgen…
Saeed Masoumi
  • 615
  • 3
  • 9
  • 19
20
votes
2 answers

How to revoke a GPG Key and upload in GPG server?

I have create GPG Keys for code signing and created a revocation certificate also. As far as I know, if key is compromised then i can revoke the key using revocation certificate. Can someone suggest me how to revoke my key with revocation…
Karma Yogi
  • 333
  • 1
  • 3
  • 11
16
votes
1 answer

How to quickly identify SSH private key file formats?

Triggered today by Remote Desktop Manager, whose SSH Key Generator offered to save a private key in OpenSSH format, but then proceeded to store it in PKCS#1 / OpenSSL format, while using the same random *.pri file extension for two of the offered…
Reto Höhener
  • 1,563
  • 6
  • 16
  • 30
14
votes
1 answer

Security concerns of displaying ssh private key

I've made a huge mistake, or at least I think I did: I've "catted" my private SSH key cat ~/.ssh/id_rsa I'm now afraid that I've created a security hole, allowing other users to see my private key by looking at bash/scrollback history or using…
LeartS
  • 243
  • 1
  • 5
11
votes
3 answers

How to ssh from one ec2 instance to another?

I have created two EC2 instances on AWS. I created a key pair for each of them. I downloaded the .pem private keys and converted them into .ppk format. I can connect to each of my ec2 instances using PuTTY and their .ppk private key. But how do I…
Stephen Walsh
  • 213
  • 1
  • 2
  • 5
9
votes
1 answer

How to add multiple PGP keys to my keybase ID?

I am using keybase and I try to add to add a secondary PGP key to my ID. However, when I try to select a key from my local keyring, I get the following message. ~ $ keybase pgp select ▶ ERROR You already have a PGP key registered (0CF0 0000 0000…
q9f
  • 1,132
  • 6
  • 17
  • 30
1
2 3
9 10