Questions tagged [public-key]

289 questions
356
votes
2 answers

Create a public SSH key from the private key?

Let's suppose I have a SSH key, but I've deleted the public key part. I have the private key part. Is there some way I can regenerate the public key part?
Amandasaurus
  • 33,461
158
votes
5 answers

How do I make ssh fail rather than prompt for a password if the public-key authentication fails?

I've got a script that SSHes several servers using public key authentication. One of the servers has stopped letting the script log in due to a configuration issue, which means that the script gets stuck with a "Password:" prompt, which it obviously…
rjmunro
  • 2,361
106
votes
3 answers

Add comment to existing SSH public key

I have an existing SSH key (public and private), that was created with ssh-keygen. How can I add a comment to this existing key?
Martin
  • 1,343
105
votes
6 answers

How to get a .pem file from ssh key pair?

I created a key pair using ssh-keygen and get the two clasic id_rsa and id_rsa.pub. I imported the public key into my AWS EC2 account. Now I created a windows instance and to decrypt that instance password, AWS console is asking me for a .pem file.…
user120858
75
votes
2 answers

Multiple public keys for one user

This question is similar to SSH public key authentication - can one public key be used for multiple users? but it's the other way around. I'm experimenting on using ssh so any ssh server would work for your answers. Can I have multiple public keys…
Russell
  • 897
56
votes
3 answers

Disable the public key check for rpm installation

I want to make a DVD with some useful packages (for example php-common). The only problem is that if I try to install on a computer that's not connected to internet, I can't validate the public key. The scenario is like this: I download the RPMs,…
zozo
  • 873
54
votes
6 answers

Stop ssh client from offering all the public keys it can find?

Like most sysadmins I use openssh all the time. I have about a dozen ssh keys, I like to have a different ssh key for each host. However this causes a problem when I am connecting to a host for the first time, and all I have is a password. I want to…
Amandasaurus
  • 33,461
44
votes
1 answer

What is the meaning of an equal sign = or == at the end of a SSH public key?

I just noticed that most of the ssh pubkeys in my authorized_keys end on == or = E.g. ssh-rsa…
Lukas Loesche
  • 960
  • 1
  • 7
  • 11
34
votes
4 answers

Authentication Order with SSH

When I login via ssh with -v I see that ssh is authenticating the following way debug1: Authentications that can continue: publickey,gssapi-with-mic,password,hostbased I would like to change the order ...any idea how? My bigger problem is that…
oz123
  • 1,338
  • 5
  • 18
  • 34
33
votes
3 answers

Is it possible to get OpenSSH to log the public key that was used in authentication?

I have a production system where several different people are allowed to log in to a single account - the account is for the application and not for the person as we don't have personal accounts on production servers. For auditing purposes I want to…
Guss
  • 3,080
31
votes
2 answers

Public key authentication or similar over HTTP/HTTPS?

Is it possible to configure Apache, or some other web server, to use some kind of public-key authentication? What I would like, ideally, is to be able to give users access to a site without the need for a username/password, provided that they have…
ezzatron
  • 415
30
votes
7 answers

SSH: Two Factor Authentication

I currently have a Ubuntu Server 12.04 running OpenSSH along with Samba and a few other services. At the current time I have public key authentication set up, and I'm wondering if it's possible to set up two factor authentication? I've been looking…
29
votes
6 answers

certutil: function failed: security library: bad database

when I'm using certutil it returns this error: certutil: function failed: security library: bad database. e.g. I can't list certs or keys How Can I fix this?
Zim3r
  • 1,634
26
votes
6 answers

Why should I use Public-Key Authentication for SSH?

I am running a SSH server and I am still using simple password authentication. Everywhere I read about security I am advised to use Public-Key Authentication. But I don't get the advantages. Using them is, in my eyes, either insecure or a lot of…
Aravor
  • 371
26
votes
8 answers

A system for distributing SSH public keys

We have many different systems that are managed by several people. We have chosen to use SSH public key authentication to access those systems. This works great, as there is no need to manage or share administrative account passwords, no need to…
Jacek Konieczny
  • 3,925
  • 2
  • 25
  • 22
1
2 3
19 20