Questions tagged [public-key]

271 questions
275
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
  • 30,211
  • 62
  • 184
  • 246
142
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,221
  • 4
  • 18
  • 22
86
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
84
votes
2 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,123
  • 1
  • 10
  • 10
70
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
  • 847
  • 1
  • 7
  • 7
49
votes
5 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
  • 30,211
  • 62
  • 184
  • 246
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
  • 970
  • 1
  • 7
  • 11
44
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
  • 753
  • 3
  • 11
  • 22
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
  • 1
  • 4
  • 6
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…
Concrete Donkey
  • 435
  • 5
  • 8
30
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
  • 2,520
  • 5
  • 32
  • 55
27
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,198
  • 5
  • 16
  • 32
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
  • 3
  • 6
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,597
  • 2
  • 21
  • 22
23
votes
4 answers

Why does Amazon release private keys instead of public keys?

My brain is wrapped around the axle on public and private keys. When you create a cloud server (instance) on Amazon's EC2 service and then want to connect to it via SSH, Amazon requires you to download private a key to make the connection. Doesn't…
Seth
  • 423
  • 1
  • 4
  • 8
1
2 3
18 19