Questions tagged [public-key]

Public-key (or asymmetric) cryptography is a form of cryptography that does not require common secrets between the communicating partners.

Public-key cryptography or asymmetric cryptography is a form of cryptography that does not require common secrets between the communicating partners. It thus solves the problem of key-exchange. In many modern cryptosystems, public-key cryptography is used to establish a secret key, and the faster symmetric key crypto is used to actually encrypt and decrypt data.

Public-key cryptography is generally based on "one-way" mathematical functions - operations that are easy to perform, but difficult to undo. An example (on which RSA is based) is multiplication vs. factoring. Given two enormous primes p and q, it is simple (for a computer) to multiply them together to get p*q = n, but it turns out it is very difficult (even for a computer) to factor n in a reasonable amount of time.

1015 questions
852
votes
34 answers

Permission denied (publickey) when deploying heroku code. fatal: The remote end hung up unexpectedly

I'm attempting to deploy my code to heroku with the following command line: git push heroku master but get the following error: Permission denied (publickey). fatal: The remote end hung up unexpectedly I have already uploaded my public SSH key,…
vich
  • 11,638
  • 13
  • 46
  • 60
738
votes
46 answers

How to solve Permission denied (publickey) error when using Git?

I'm on Mac Snow Leopard and I just installed git. I just tried git clone git@thechaw.com:cakebook.git but that gives me this error: Initialized empty Git repository in `/Users/username/Documents/cakebook/.git/` Permission denied…
teepusink
  • 23,746
  • 37
  • 103
  • 147
491
votes
30 answers

Adding a public key to ~/.ssh/authorized_keys does not log me in automatically

I added the public SSH key to the authorized_keys file. ssh localhost should log me in without asking for the password. I did that and tried typing ssh localhost, but it still asks me to type in the password. Is there another setting that I have to…
user482594
  • 14,066
  • 18
  • 62
  • 92
225
votes
6 answers

How does a public key verify a signature?

I am trying to get a better grapple on how public/private keys work. I understand that a sender may add a digital signature to a document using his/her private key to essentially obtain a hash of the document, but what I do not understand is how the…
223
votes
16 answers

Using scp to copy a file to Amazon EC2 instance?

I am trying to use my Mac Terminal to scp a file from Downloads (phpMyAdmin I downloaded online) to my Amazon EC2 instance. The command I used was: scp -i myAmazonKey.pem phpMyAdmin-3.4.5-all-languages.tar.gz …
HoKy22
  • 3,337
  • 6
  • 30
  • 50
220
votes
4 answers

What is the difference between a cer, pvk, and pfx file?

What is the difference between a cer, pvk, and pfx file? Also, which files do I keep and which am I expected to give to my counter-parties?
Jonathan Allen
  • 63,625
  • 65
  • 234
  • 426
199
votes
23 answers

GitHub: Permission denied (publickey). fatal: The remote end hung up unexpectedly

I have followed these instructions below to upload a project. Global setup: Download and install Git git config --global user.name "Your Name" git config --global user.email tirenga@gmail.com Add your public key Next steps: mkdir…
ziiweb
  • 28,757
  • 70
  • 168
  • 290
173
votes
13 answers

Github permission denied: ssh add agent has no identities

This is my first time accessing GitHub and I'm not experienced using a console. I am on a MacBook using Bash. When I try to access GitHub, I get this: git clone git@github.com:dhulihan/league-of-legends-data-scraper.git Cloning into…
Dark
  • 1,839
  • 2
  • 9
  • 4
169
votes
13 answers

Getting the PublicKeyToken of .Net assemblies

What is the simplest way to find the Public-Key-Token of an assembly? The simplest way I can think of would be a simple right-click, get public key, but this functionality isn't there, maybe there is a Visual Studio Extension for that? I'm using…
moi_meme
  • 8,338
  • 3
  • 44
  • 60
143
votes
4 answers

Github: readonly access to a private repo

I am developing some private projects on Github, and I would like to add nightly cronjobs to my deployments servers to pull the latest version from github. I am currently doing this by generating keypairs on every deployment server and adding the…
Jeroen
  • 28,942
  • 33
  • 116
  • 190
143
votes
14 answers

Heroku 'Permission denied (publickey) fatal: Could not read from remote repository' woes

I've searched around for many hours on end looking to a solution to my seemingly easy-to-fix problem. It's not that my search turned up nothing, it's that my search turned up so many different solutions -none of which have worked. Anyways, I am…
thebradbain
  • 3,069
  • 4
  • 14
  • 17
116
votes
5 answers

How can I transform between the two styles of public key format, one "BEGIN RSA PUBLIC KEY", the other is "BEGIN PUBLIC KEY"

How can I transform between the two styles of public key format, one format is: -----BEGIN PUBLIC KEY----- ... -----END PUBLIC KEY----- the other format is: -----BEGIN RSA PUBLIC KEY----- ... -----END RSA PUBLIC KEY----- for example I generated…
welkinwalker
  • 1,564
  • 3
  • 13
  • 20
114
votes
12 answers

key_load_public: invalid format

I used PuTTY Key Generator to generate a 4096 bit RSA-2 key with a passphrase. I save the .ppk and an openSSL format public key. The putty format public key doesn't work. In any case, my error is as follows: $ ssh -T git@github.com key_load_public:…
JordanGS
  • 2,894
  • 5
  • 13
  • 21
88
votes
12 answers

How do I add my own public key to Vagrant VM?

I got a problem with adding an ssh key to a Vagrant VM. Basically the setup that I have here works fine. Once the VMs are created, I can access them via vagrant ssh, the user "vagrant" exists and there's an ssh key for this user in the…
tehK
  • 2,015
  • 3
  • 14
  • 16
84
votes
9 answers

Verify host key with pysftp

I am writing a program using pysftp, and it wants to verify the SSH host Key against C:\Users\JohnCalvin\.ssh\known_hosts. Using PuTTY, the terminal program is saving it to the Registry [HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys]. How…
Gabriel Theodoulos
  • 959
  • 1
  • 6
  • 5
1
2 3
67 68