Questions tagged [ssh-keys]

an authorization mechanism for SSH involving public-key cryptography.

SSH keys are an authorization mechanism for SSH involving public-key cryptography. It consists of

  • A private/public key pair generated by a utility like ssh-keygen.
  • A configured (in /etc/ssh/sshd_config) SSH daemon that allows public key authentication.
  • A configured user account that has the public key copied to ~/.ssh/authorized_keys.
792 questions
8
votes
3 answers

Proper SSH keys location for a system user?

I have a system account with which I run a database (namely mongodb). By default it has no home. Now I'd like to trigger scp commands from that account, with ssh keys authentication to a remote server, to export backups. Should I just create a…
Thibaut Barrère
  • 691
  • 1
  • 9
  • 17
8
votes
1 answer

SSH keys: ed25519 vs RSA performance demystified

It is claimed that ed25519 keys are better than RSA, in terms of security and performance. In terms of security, I understand that 4096 bits RSA keys are practically unbreakable for the foreseable future, so I am not asking about that. What I would…
a06e
  • 353
  • 1
  • 4
  • 10
8
votes
3 answers

Is it harmless to use the same ssh private/public keypair from multiple computers?

Whenever I get a new laptop, I copy the public and private ssh keys from the older one. But since I sometimes hold on to the old laptops, I'll be logging into servers and such using the same dsa keypair from up to 3 different computers. Is there any…
dan
  • 847
  • 2
  • 9
  • 11
7
votes
3 answers

How can I add a .pem private key fingerprint entry to known_hosts before connecting with ssh?

WARNING -> Please be careful when reading this problem description. I had some assumptions that were not correct as I was writing this question. Make sure you read my answer explaining what I had wrong! I have host A in AWS as an EC2 instance. I a…
Jazzepi
  • 191
  • 1
  • 8
7
votes
1 answer

Cannot edit VM or access it via SSH. error:Supplied fingerprint does not match current metadata fingerprint

I have a Linux machine on Google Cloud, created with Bitnami. It was working well, and it could be accessed through SSH, usign the web console or putty. However suddenly today it can not be accessed via SSH in any way. When I try to edit the VM and…
7
votes
3 answers

Connection closed by [preauth]

I'm on a Ubuntu server. I'm trying to enable an ssh tunnel in order to add a git remote in a project of mine. On my local win7 machine I generated the key pair with PuTTYgen. I pasted the public key in authorized_keys file I set the private PuTTY…
alfredopacino
  • 203
  • 1
  • 2
  • 6
7
votes
2 answers

Using ssh key pair authentication and disabling ssh password authentication - what happens if private key lost?

I'm configuring my first server on Linode and going through their set up tutorials. In their Securing Your Server tutorial, it recommends using ssh key pair authentication and disabling password authentication. My question is if I disable password…
Adam Johns
  • 315
  • 1
  • 2
  • 7
7
votes
1 answer

OpenSSH daemon ignores ServerKeyBits directive

I'm having an issue with my Fedora 19 x86_64 virtual machine. It seems to ignore my 4096-bit key setting. I've set the ServerKeyBits directive to 4096, stopped the sshd service, deleted all host keys in the /etc/ssh/ directory, and then restarted…
Carl Bennett
  • 783
  • 3
  • 7
  • 14
7
votes
1 answer

How to deliver private ssh keys for a virtualbox controlled by vagrant?

By default, Vagrant uses an insecure private key used when logging into the machine with vagrant ssh. Vagrant supports specifying a different private key via private_key_path however I am not clear how I can best deliver this key with the box file.…
JE42
  • 221
  • 1
  • 2
  • 5
7
votes
2 answers

How do I get a public ssh key on a docker jenkins image for git authentication?

I'm using Docker and I'm running a Jenkins image. The image I'm trying: https://github.com/orchardup/docker-jenkins I need to generate an ssh key pair so I may use it to authenticate to bitbucket. This is so that jenkins may pull my source code and…
Jason Prawn
  • 171
  • 1
  • 1
  • 3
7
votes
5 answers

Add authentication keys to dropbear ssh?

For ssh I usually add keys to /etc/ssh/keys-root/authorized_keys so that I can log in without entering a password. I recently discovered a few systems that use dropbear ssh instead of ssh/openssh. Is there an equivalent to authorized_keys for…
EGr
  • 609
  • 4
  • 14
  • 29
7
votes
2 answers

Use CloudInit cloud-config file to add authorized_keys for multiple users

Is it possible to add ssh authorized keys for multiple users using a #cloud-config file with CloudInit? I'm trying to initialize a new EC2 instance created from an Amazon Linux AMI using CloudInit. I'm able to add custom ssh authorized public keys…
Mike Deck
  • 183
  • 1
  • 1
  • 7
7
votes
4 answers

SSH still asks for password even after adding key to authorized_keys

Here are the steps I did on my local computer: ssh-keygen -t rsa cat ~/.ssh/id_rsa | ssh root@remotehost.com -p 1234 "cat > ~/.ssh/authorized_keys" When I do a ssh root@remotehost.com -p 1234 it still asks for the password :o root@remotehost.com's…
Jürgen Paul
  • 1,265
  • 4
  • 15
  • 22
7
votes
3 answers

Allow only specific keys in agent forwarding?

Is it possible to use agent forwarding excluding all keys from being forwarded, except ones specifically stated? Alternatively, are there any ways to specify the order the keys are tried per session? Using ssh-agent requires managing different…
dgo.a
  • 209
  • 3
  • 8
7
votes
1 answer

Choosing the encryption algorithm used by OSX ssh-keygen

I have several users that use SmartCVS on OSX to interact with our CVS repository. We use the cvs :ext: (SSH2) method to access the repository, which is stored on a remote linux system. We use ssh key authentication, and require that users encrypt…
EEAA
  • 109,363
  • 18
  • 175
  • 245