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
5
votes
3 answers

how to use Parallel SSH with Amazon EC2 instances?

I am trying to run an Parallel SSH with Amazon Instances, But I am getting Permission denied expception, How ever I can SSH it to the server. How we can run PSSH with key login. So far I have tried like, pssh -h hosts-file -i xxx.pem -l username…
Ananth Duari
  • 161
  • 1
  • 1
  • 3
5
votes
4 answers

OpenSSH on Ubuntu 10.10 (Maverick): should ~/.ssh/authorized_keys file be generated automatically?

I'm setting up public key authentication using this guide: https://help.ubuntu.com/community/SSH/OpenSSH/Keys. The documentation talks about the ~/.ssh/authorized_keys file, but there is no ~/.ssh/authorized_keys file is my home directory. Should…
unpossible
  • 218
  • 3
  • 9
5
votes
5 answers

Pass your password to your SSH key via a script

I am writing a script that will allow me to retrieve a file from all of my servers at once. I have SSH keys in place in order to log into my servers. My SSH key however requires a password. The script I am writing will not be automated, it will only…
mhost
  • 1,179
  • 3
  • 16
  • 25
5
votes
5 answers

How can I flush my ssh keys on power management activity?

Using ssh-agent and private keys per the usual. Everything's working as normal. My question regards best practices on flushing keys from ssh-add on activity like sleep, suspend, hibernate, etc. I thought about writing a simple wrapper around those…
Sam Halicke
  • 6,222
  • 1
  • 25
  • 35
5
votes
5 answers

Sharing public key with ssh

Is it possible to somehow setup an ssh server that doesn't require a username,password or cert to login? If that's not possible, if I were to give all customers the same public key, would each connection be encrypted individually? (i.e. user A…
jtnire
  • 817
  • 2
  • 8
  • 16
4
votes
2 answers

How can I make Ansible use the SSH signed client certificate for connections?

I have implemented SSH CA client signing on my servers. Sshd is configured on my servers with the following directive: TrustedUserCAKeys /etc/ssh/trusted-users-ca.pem I modified my local ssh config file so my cert is sent as well, when I connect to…
Jeroen Jacobs
  • 1,386
  • 3
  • 16
  • 25
4
votes
3 answers

Putty "Server Refused our key" Google Cloud Platform compute engine instances

We have two compute engine instances(both Linux VM's) on one Project. One I had access through Putty and it was connecting fine. But the other instance I had the "Server Refused our Key" error when trying to connect through putty. In trying to fix…
Joseph Flores
  • 81
  • 1
  • 1
  • 5
4
votes
5 answers

Google Cloud Services - unable to SSH into instance at all

I am unable to SSH into my instance on the Google Cloud Services. I am not very well versed in VM management and troubleshooting, but have tried everything I knew, and google could provide to me including: Attempting to SSH from an external…
4
votes
1 answer

force ssh to use agent, without fallback to directly accessing the IdentityFile

Company policy requires some ssh keys to be stored securely, e.g. on dedicated USB device. Using keys not stored on the host machine works flawlessly using gnupg with enable-ssh-support, even when multiple keys are used: Host example.com …
anx
  • 8,963
  • 5
  • 24
  • 48
4
votes
1 answer

ssh with key content instead of identity_file

Instead of ssh -i mykey.pem I would like to pass the content of mykey.pem to the ssh command. Is that possible somehow? Background: the mykey.pem is stored encryptedly. I would like to decrypt it on the fly (in a CI tool) and pass it to ssh.…
kev
  • 261
  • 1
  • 5
  • 13
4
votes
3 answers

gcloud SSH connection asks for password instead of passphrase

I've got two VMs set up on Google Cloud Platform. server1 uses an Ubuntu 16.04 image [g1-small (1 vCPU, 1.7 GB memory)]; and the newly created VM, called server2, uses a CoreOS Stable image [f1-micro (1 vCPU, 0.6 GB memory)]. The main problem is I…
fillipvt
  • 181
  • 1
  • 1
  • 9
4
votes
2 answers

SSH known_hosts with a dynamic IP

I have a machine behind a firewall. I connect to it remotely using a VPN tunneling with a port forward through ssh. To connect to the machine I use the external IP of the VPN and my personal and temporary assigned port. The command I use is: ssh…
Ilmanowar
  • 51
  • 1
  • 5
4
votes
2 answers

SSH key authentication at server side

I usually do ssh key authentication as follows: generate key on client pc (# ssh-keygen -t rsa) copy the key to server (using ssh-copy-id or by other means) access server from client PC. I have seen AWS servers (Amazon web servers) provide a key…
4
votes
2 answers

How to automate sending new public key of SSH server to users?

When the key pair of an SSH server, that is, the keys at /etc/ssh/ssh_host_(rsa|dsa|ecdsa|etc)_key and at /etc/ssh/ssh_host_(rsa|dsa|ecdsa|etc)_key.pub are updated, the SSH users should be notified about the server's new public key. Assuming…
Utku
  • 145
  • 4
4
votes
1 answer

how ssh-agent process is increasing on every login

i have added the following line in my .bashrc file to start ssh-agent if it is not running. if [ -z "$SSH_AUTH_SOCK" ];then eval `ssh-agent -s`;ssh-add ~/.ssh/my_private_key;fi But every time when i login again the number of ssh-agent process is…
Pawan
  • 41
  • 1
  • 2