Questions tagged [public-key]
Public-key (or asymmetric) cryptography is a form of cryptography that does not require common secrets between the communicating partners.
1,173
questions
1116
votes
66
answers
2.1m
views
Git: 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 [email protected]:cakebook.git
but that gives me this error:
Initialized empty Git repository in `/Users/username/Documents/...
857
votes
34
answers
225k
views
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 ...
527
votes
32
answers
734k
views
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 ...
344
votes
10
answers
162k
views
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 ...
285
votes
19
answers
500k
views
Using scp to copy a file to Amazon EC2 instance? [closed]
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-...
272
votes
17
answers
286k
views
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 [email protected]:dhulihan/league-of-...
244
votes
4
answers
258k
views
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?
201
votes
22
answers
328k
views
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 [email protected]
...
195
votes
13
answers
201k
views
Getting the PublicKeyToken of .Net assemblies [duplicate]
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 ...
167
votes
5
answers
141k
views
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-----
...
-----...
164
votes
5
answers
105k
views
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 ...
151
votes
15
answers
389k
views
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 ...
148
votes
14
answers
107k
views
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 ...
131
votes
13
answers
145k
views
Setting up OpenSSH for Windows using public key authentication
I am having issues setting up OpenSSH for Windows, using public key authentication.
I have this working on my local desktop and can ssh with a key from Unix machines or other OpenSSH for Windows ...
119
votes
9
answers
80k
views
GitHub Error: Key already in use
I have created two GitHub accounts. One for my work user and one for my personal self. I needed to do catch up on some work and as such cloned my work repo onto my personal PC. In order to do ...
113
votes
24
answers
263k
views
git push: permission denied (public key)
I'm trying to push a file to a git repo of a friend but errors on public key.
git push origin testbranch
Permission denied (publickey).
fatal: Could not read from remote repository.
Where and how do ...
109
votes
13
answers
121k
views
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 ...
107
votes
9
answers
218k
views
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 [...
104
votes
5
answers
66k
views
What is the public URL for the Github public keys
I heard that there was a public URL for all users on github where you can access their public keys or they can supply that URL of all their public keys. Is this true? If so what is that URL. Does it ...
82
votes
3
answers
449k
views
Permission denied (publickey,keyboard-interactive) [closed]
I tried to connect to planetlab node using ssh. It throws me error like Permission denied (publickey,keyboard-interactive). What does this mean?
Here is the verbose of the exception.
> OpenSSH_5....
79
votes
4
answers
198k
views
How to ssh connect through Python Paramiko with ppk public key
I'm using Paramiko to connect through SSH to a server.
Basic authentication works well, but I can't understand how to connect with public key.
When I connect with PuTTY, the server tell me this:
Using ...
70
votes
7
answers
155k
views
RSA: Get exponent and modulus given a public key
I need to encrypt some data using RSA in JavaScript. All of the libraries around ask for an exponent and a modulus, yet I get a single public.key file from my opponent.
How do you retrieve the ...
63
votes
2
answers
102k
views
How do I setup Public-Key Authentication? [closed]
How do I setup Public-Key Authentication for SSH?
61
votes
7
answers
22k
views
Android In App Billing: securing application public key
From Android In App Billing version 3 (TrivialDrive)sample application coming with sdk
MainActivity.java
/* base64EncodedPublicKey should be YOUR APPLICATION'S PUBLIC KEY
* (that you got from the ...
58
votes
6
answers
118k
views
How to append authorized_keys on the remote server with id_rsa.pub key
How to append authorized_keys on the remote server with id_rsa.pub key from the local machine with a single command?
57
votes
2
answers
31k
views
How to let TortoiseHg (Mercurial) on Windows use the Private Key file generated (by Puttygen)?
I have used Puttygen to create a public and a private key, and then is ready to let TortoiseHg on Windows 7 do a clone by going to
ssh://[email protected]/somecode
but there seems to be ...
52
votes
4
answers
86k
views
How do I send someone my SSH public key? [closed]
I need to send my SSH Public Key to one of my customers, but I am not quite sure how to do this. I have already created a SSH key pair on my computer, but now I am stuck.
50
votes
3
answers
116k
views
X.509: Private / Public Key
We're trying to implement some functionality of a Web-Service from one of our partners. Now, the content which is beeing transmitted, should be encrypted with a public key, which we have to provide.
...
48
votes
6
answers
33k
views
Why is a cap deploy giving Permission denied (publickey)?
Ok, I'm confused about something... I am able to commit to my github repository just fine, but when I try to do a cap deploy from my local folder to my staging server I get Permission denied (...
48
votes
2
answers
80k
views
How to load public certificate from pem file?
I was trying to extract RES public key from the file below
-----BEGIN CERTIFICATE-----
...
47
votes
5
answers
115k
views
How to load the RSA public key from file in C#
I need to load the following RSA public key from a file for use with the RSACryptoServiceProvider class. How can I do this?
-----BEGIN PUBLIC KEY-----
...
43
votes
1
answer
51k
views
How to convert Byte array to PrivateKey or PublicKey type?
I am using RSA algorithm to generate public and private key
final KeyPairGenerator keyGen = KeyPairGenerator.getInstance(ALGORITHM);
keyGen.initialize(1024);
final KeyPair key = keyGen....
43
votes
1
answer
81k
views
Use and utility of .p12 certificate/file
What is the utility of .p12 file/certificate? I am not getting any correct definition when searching the internet:
In one site I got "it stores server side certificates along with intermediate ...
41
votes
5
answers
55k
views
Encrypt in Javascript, decrypt in PHP, using public-key cryptography
I'd like to encrypt in JavaScript, decrypt in PHP, using public-key cryptography. I've been trying to find libraries that can accomplish this, but am having issues.
I am currently looking at ...
37
votes
14
answers
159k
views
Permission denied (publickey,gssapi-keyex,gssapi-with-mic) on openshift
I am having issues with committing changes to my gear. I have tried to run rhc setup, I also deleted my .ssh folder and executed rhc setup again but that also didnt work.
Not sure what changed but ...
37
votes
1
answer
8k
views
What is GitHub's public GPG key?
If you make an edit through GitHub's website, or merge a pull request, then the resulting commits are automatically signed with GitHub's GPG key. It looks like this:
I would like to have the full ...
35
votes
12
answers
73k
views
How do I convert multi public key into a single line?
I'm trying to make a txt file with a generated key into 1 line. example:
<----- key start ----->
lkdjasdjskdjaskdjasdkj
skdhfjlkdfjlkdsfjsdlfk
kldshfjlsdhjfksdhfksdj
jdhsfkjsdhfksdjfhskdfh
...
33
votes
5
answers
76k
views
How to sign string with private key
How can I get the signature of a string using SHA1withRSA if I already have the Private Key as byte[] or String?
31
votes
4
answers
22k
views
Could not generate ssh public key for heroku in Windows 7
While I am trying heroku login through cmd in my machine, it says
Could not find existing public key
Would you like to generate one? [YN]
After that when I press 'y' and enter it says
...
31
votes
5
answers
83k
views
C# How to simply encrypt a text file with a PGP Public Key?
I've researched a bit about how to achieve what I said in the question and found several APIs but most of them look very complicated and since I'm just a noobie in this area I just want a simple ...
29
votes
4
answers
12k
views
Why does git sign with GPG keys rather than using SSH keys?
What are the differences between SSH and GPG asymmetric keys and why does git support signing with GPG rather than using the SSH agent?
28
votes
13
answers
76k
views
Google Cloud Platform: SSH to Google cloud instance will have "Permission denied (publickey)"
I have come across the issue as below when I use ssh login google cloud instance
$ ssh -i DD2 [email protected]
Permission denied (publickey).
After some testing, I found that the cause of the ...
27
votes
1
answer
46k
views
SSH: "Bad passphrase" after generation of public key
When I execute these commands (setting a passphrase, after the first)...
$ ssh-keygen -t dsa
$ chmod 600 my_key
$ chmod 600 my_key.pub
...and then, to test the passphrase...
$ ssh-add my_key.pub
.....
27
votes
1
answer
42k
views
Converting Strings to encryption keys and vice versa java
I'm currently working on a way to convert keys into strings and vice versa. It works for the public key conversions, and converts a private key into a String. For some reason the same code won't ...
27
votes
2
answers
10k
views
git setup for multiple repos on same server
Probably a simple question, but I am at a loss here...
In github one can add a deployment key for each repository which only gives access to that single repository.
But for one client I have two ...
27
votes
1
answer
18k
views
What are the differences between JWT RS256, RS384, and RS512 algorithms?
I'm using JWT RS256 algorithm in my current project, but I'm wondering what are the differences between algorithms RS256, RS384, and RS512. Can someone explain to me what are the key differences in ...
26
votes
2
answers
23k
views
C# RSA Public Key Output Not Correct
I am currently trying to generate and send a public RSA key using C#. It should be a 2048 bit long key in PEM format. I have successfully done so using OpenSSL command with the following (some output ...
26
votes
7
answers
102k
views
Read public key from file in keystore
Hi I want to extract public key from KeyStore using Java code
I am creating a keystore
keytool -genkey -alias mykeystore -keyalg RSA -keystore mykeystore.jks -keysize 2048
And exporting the public ...
25
votes
3
answers
105k
views
How to check a public RSA key file
Inside a shell script I want verify public RSA file.
All I want to do is that find a way to check this file is a genuine public key file, nothing else.
Can I ask experts here what are the ways I can ...
23
votes
3
answers
28k
views
How can I get SecKeyRef from DER/PEM file
I need to integrate my iPhone app with a system, and they require to encrypt data by a given public key, there are 3 files in 3 different format .xml .der and .pem, I have researched and found some ...