Questions tagged [public-key]

283 questions
11
votes
3 answers

Can I use Public-Key-Pins with LetsEncrypt?

Can I setup Public-Key-Pins when I setup a cronjob to renew the LetsEncrypt certificate every 30 days? If the certificate is renewed then the Public-Key-Pin is also renewed right?
Bob Ortiz
  • 444
  • 4
  • 21
11
votes
4 answers

How can I enable both password and public key authentication with OpenSSH

I would like for sshd to verify the users' public key and then prompt for their password, rather than just one or the other. Is this possible?
surprise_
  • 213
  • 1
  • 2
  • 6
11
votes
4 answers

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 I'm now ready to let TortoiseHg on Windows 7 do a clone by going to ssh://somebody@code.somewhere.com/somecode but there seems to be no where to add the private key to TortoiseHg? (or…
nonopolarity
  • 535
  • 3
  • 6
  • 17
11
votes
2 answers

ssh how to allow a very limited user with no home to login with pubkey

I have a very restricted user in my ssh server created with --no-create-home and --shell /bin/false. I know I can define authorized_keys file in sshd_configs for the user's public key. But how can I allow public key authentication for this user…
Mojtaba Rezaeian
  • 451
  • 5
  • 14
10
votes
4 answers

Encrypt temporary password using public ssh key

I manage a virtual office and our staff uses both SSH keys and passwords for authentication. If one of our staff forgets his password, is there a way to encrypt a temporary password using his public RSA ssh key so I can send it to him via…
David M. Syzdek
  • 338
  • 2
  • 12
9
votes
1 answer

How can I get sshd to tell me why it's failing public key authentications?

I'm using OpenSSH 6.9p1 (on Lubuntu) as my SSH server. When trying to connect to it (using an SSH client in Cygwin), I keep being reverted to password authentication, despite having properly generated my keys, put them in the authorized key file on…
einpoklum
  • 1,652
  • 3
  • 21
  • 31
8
votes
2 answers

Setup public key authorized SSH for non-root users

I was able to setup ssh login using public keys for root users and tried to apply the same logic for non-root users. I have tried to troubleshoot this issue in vain. I am using centos for both my local machine and remote server. Here is a gist of my…
user2887201
  • 223
  • 1
  • 2
  • 5
8
votes
1 answer

Cannot import EC2 keypair (Length exceeds maximum) via AWS console from existing keypair

I want to use the same keypair from one availability zone in another but I cannot import it. If I generate a new key I get the same error. See AWS console > Newtwork and Security > Key pairs > Import key pair then choose an existing EC2 keypair and…
KCD
  • 958
  • 3
  • 12
  • 24
8
votes
2 answers

What is a good and safe way of sharing ssh-keypairs?

I have a few key-pairs, that are used as authentication, to ssh into my servers on the Amazon cloud. I rotate those certificates weekly, manually. My question is, I need to share the certificates with some colleagues, a few on the LAN, and a few in…
theTuxRacer
  • 549
  • 2
  • 9
  • 22
7
votes
4 answers

How to find out which key was used for public key authentication?

Several developers using a shared account on a test server, using public key authentication. Is there any way to find out which key was used for authentication (e.g. the keys comment)?
Gyongyeee
  • 73
  • 4
7
votes
1 answer

Is the ssh key name a part of the authentication?

The ssh public keys in authorized_hosts have three parts - a type, the key and a name. For example, an rsa key might look like: ssh-rsa gn29JyDdiyLFlggptrCxgzS6diAF6o94DtgoF9grbm7g+Mtrly NAME1 Will the same key be valid with a…
Adam Matan
  • 13,194
  • 19
  • 55
  • 75
7
votes
2 answers

configure OpenSSH to prefer public key auth, fall back to empty password auth

I would like to configure OpenSSH 6.2p2 for a service account (we'll call it "serviceacct") with an empty password which does the following: First try public key authentication; if it succeeds then run the forced command specified in the…
Scott Duckworth
  • 846
  • 1
  • 10
  • 12
7
votes
2 answers

CentOS Create User With No Password, Only Public Key Auth

How can I create a user on CentOS 5.6, which cannot login with a password. I.E. they can only login and SSH using public key authentication. useradd myuser -d /their-home-dir Will that do it, without calling passwd?
Justin
  • 5,328
  • 19
  • 64
  • 84
7
votes
4 answers

SSH public key authentication -- always require users to generate their own keypair?

I was working with a partner today that I needed to upload files to my server using scp. I have passwords turned off in the server's SSH configuration, so I wanted them to use public key authentication. I generated the key pair for them on the…
schinazi
  • 173
  • 3
6
votes
1 answer

What is the good practice for adding known keys/fingerprints to known_hosts

There are plenty of answers to questions similar to this one but I can't seem to find one with a clear answer. They all either grab the public key at least once, ignore the key altogether, or write directly to the known_hosts file (implies no…
D.Mill
  • 379
  • 5
  • 15
1 2
3
18 19