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
40
votes
8 answers

Automating ssh-copy-id

I have some arbitrary number of servers with the same user/pass combination. I want to write a script (that I call once) so that ssh-copy-id user@myserver is called for each server. Since they all have the same user/pass this should be easy but…
devin
  • 1,246
  • 3
  • 20
  • 27
39
votes
9 answers

Auto accept rsa key fingerprint from command line

I've tried yes | ssh root@10.x.x.x to try to accept the RSA key fingerprint, but am still prompted if I'm sure I want to connect. Is there a way to make this automatic?
VenomFangs
  • 647
  • 2
  • 7
  • 10
38
votes
2 answers

Is there a security risk to disclosing your SSH known_hosts file?

I'm speaking at a conference next week about some software tools I've created. My laptop will be shown on a projector screen during this presentation. The presentation will be videotaped and posted on youtube. If, for some reason, I have occasion…
Matt Korostoff
  • 495
  • 4
  • 7
38
votes
7 answers

Unable to ssh to GCE: "Permission denied (publickey)"

I created a VM via Bitnami in Google Compute Engine. Previously, I was able to ssh via the Bitnami web interface. I tried to ssh via terminal on my Mac but kept getting the Permission denied (publickey) error. I then deleted all keys on the server…
NEO
  • 781
  • 1
  • 7
  • 10
37
votes
2 answers

ssh-copy-id specifying which key and without password

I have a public key in a server(host) that I want to transfer to another server(target). The host server has a bunch of keys in .ssh/ folder, i want to copy just one of them to the target server (it's not id_rsa.pub, so lets call…
Lucas Mattos
  • 483
  • 1
  • 4
  • 5
37
votes
3 answers

ssh-copy-id - permission denied (publickey)

I want to set up ssh tunnel to the mysql server which is in computer which has virtual machine. Also the tunnel has to work if the machine is restarted. So lets say A is computer with linux software. B - virtual machine in computer A. MySQL is in…
Darius.V
  • 539
  • 1
  • 4
  • 9
31
votes
3 answers

openssh - Adding an ssh key from putty to authorized_keys

I have been provided with an ssh key by a colleague to add to the authorized_keys file for an account on a linux server so they can access that account. The file looks something like this: ---- BEGIN SSH2 PUBLIC KEY ---- Comment:…
Michael Slade
  • 451
  • 1
  • 4
  • 7
31
votes
1 answer

Only allow password authentication to SSH server from internal network

I have an OpenSSH 5.9p1 server running on Ubuntu Precise 12.04 which accepts connections from both the internal network and the Internet. I'd like to require public key authentication for connections from the Internet, but accept either public key…
mgorven
  • 30,615
  • 7
  • 79
  • 122
30
votes
3 answers

How to configure ssh client to use private keys automatically

I'm always running ssh with the -i parameter and it's a hassle to always type in the correct key for whatever host I'm connecting to. Is there a config file or something (on Mac) to define which private key to use when connecting to a particular…
Leopd
  • 1,757
  • 4
  • 24
  • 30
28
votes
6 answers

Have a system that expires SSH keys every 90th day

I have a customer that now requires us to change every password every 90th day due to their interpretation of GDPR. That's fine for the web-based system we develop for them because we can just implement those rules. But they also require us to…
mr D
  • 280
  • 1
  • 3
  • 5
28
votes
2 answers

how to connect to mongodb server via ssh tunnel

It was easy for me to connect to my remote mysql server on AWS using a sequelpro, however I'm struggling with doing the same thing with mongodb. I tried setting up an ssh tunnel via command line like so: ssh -fN -l root -i path/to/id_rsa -L…
abbood
  • 1,127
  • 4
  • 13
  • 21
27
votes
11 answers

SSH aborts with Too many authentication failures

I'm attempting to run this simple provisioning script but I'm encountering errors when running vagrant up and then vagrant provision commands. I read that I needed to create a /etc/ansible/hosts file which I've done, populating it…
Ashley
  • 528
  • 1
  • 6
  • 14
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,777
  • 2
  • 23
  • 22
25
votes
6 answers

Windows Password won't decrypt on AWS EC2 even with the correct private key

I created a new Windows instance on AWS EC2, using a keypair I created by uploading my public key from my local machine. The instance launched fine, but it won't decrypt the password. It reports: I'm certain I uploaded the correct key. I've…
Craig Ringer
  • 11,083
  • 9
  • 40
  • 61
25
votes
5 answers

how to SSH to EC2 without explicitly using the pem key?

I have a windows as my main OS. Using VMware player, I setup a Ubuntu server 12.4 as a guest machine. The Ubuntu server have "ubuntu" user. I created a new EC2 instance + setup pem key. From the windows machine, when I use putty+pem key - I can…
user798562
  • 251
  • 1
  • 3
  • 3
1
2
3
52 53