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

SSH config using multiple ProxyJump with keys on remote machines

I want to reach any of my server with only one SSH command. My problem is that when I use "ProxyJump" or "ProxyCommand" the "IdentityFile" is searching for the key on my machine. Is there any option in the config to use a remote key for the next…
Jene
  • 31
  • 2
3
votes
1 answer

SSH ignores key in agent and keeps asking for key decryption password

In my ssh_config, I have configured SSH to use a specific key when connecting to a host. I want SSH to try only this key, not any other key it may find (in ssh agent or some other location), so I specified IdentitiesOnly, too. Host *.foobar.com …
Jan Warchoł
  • 253
  • 2
  • 9
3
votes
1 answer

Ssh Key authentication only works if I am physically logged into the server

UPDATE: This issue was caused by home directory encryption I have a strange problem. I have created and installed keys and disabled password login for SSH. If I try to SSH to the server I get a "Permission denied (publickey).". HOWEVER, if I hook a…
robert
  • 163
  • 7
3
votes
1 answer

Several ed25519 keys with the same prefix

I have created a bunch of ed25519 keys through ssh-keygen to connect to different machines I have access to. However, I noticed that all of them begin with the same, rather long prefix: AAAAC3NzaC1lZDI1NTE5A... why is that? Is it a security issue? A…
CygnusX1
  • 133
  • 3
3
votes
1 answer

Require SSH key + Google Authenticator for one account, SSH key only for another

I am trying to setup an SSH authentication structure, but I'm struggling with issues in /etc/ssh/sshd_config vs /etc/pam.d/sshd. Requirements: Accounts with root/sudo privileges require public key authentication, followed immediately by Google…
Yankee
  • 131
  • 6
3
votes
1 answer

How to set up authorized keys for dropbear local to openssh remote

I have a local machine running dropbear and I want to connect to a remote host running openssh without having to type the password every time. I have found lots of documentation on how to do the reverse, and it seems easy because dropbear does…
TechnoSam
  • 131
  • 1
  • 5
3
votes
2 answers

Setting up public key authentication to Linux server from Windows (ppk private key)

I created a public and private key using PuTTYgen and copied the public key to .ssh/authorized_keys under my user account. Then I try to specify the private key when trying to log in, but apparently it doesn't pick it up and keep asking for the…
HHH
  • 161
  • 2
  • 4
3
votes
2 answers

How to secure SFTP connection in both way

I want to setup an SFTP connection between my computer and a server. I generated a pair of keys on my computer and wrote my public key in "authorized_keys" file on the server. I'm sure it works because when I try to connect from a computer that…
Raphaël
  • 33
  • 3
3
votes
1 answer

ansible ssh connections with two factor auth

I'm setting ansible to manage a whole farm of servers. My approach is the following: Allow a user to connect to all servers protecting his connections with a heavy RSA key, passphrase protected, and user password. In order to automate as much as…
Abel
  • 322
  • 3
  • 13
3
votes
2 answers

Cannot ssh with shared keys on CentOS 7 server refused our key

I cannot ssh to a CentOS 7 server using pre-shared keys, I get a "server refused our key" message. Below is an ssh attempt using -vv OpenSSH_7.2p2, OpenSSL 1.0.2h-fips 3 May 2016 debug1: Reading configuration data /etc/ssh/ssh_config debug1:…
feub
  • 169
  • 1
  • 2
  • 9
3
votes
2 answers

GCE project-wide SSH keys not propogating

I have noticed in my GCE cluster that when I add an SSH key to the project metadata that it is then automatically added to /home/[user]/.ssh/authorized_keys. This is the behaviour I expect (and desire for the task I am doing at the moment). However,…
3
votes
0 answers

Mac OSX - SSHD partially broken after El Capitan Upgrade

I recently upgraded my firm's Mac Mini device to El Capitan from Yosemite, and encountered several issues during the upgrade. I've gotten most of them resolved but one that's still failing is the SSH connections. The machine is able to SSH into…
Nick L
  • 31
  • 2
3
votes
1 answer

Can't get SSH ProxyCommand to work (ssh_exchange_identification: Connection closed by remote host)

I'm unsuccessfully trying to use SSH ProxyCommand to connect to a server via a jump box. My config is below, I'm running this command: ssh 10.0.2.54 -F ssh.config Host x.x.x.x User ec2-user HostName x.x.x.x …
rix
  • 277
  • 4
  • 10
3
votes
1 answer

Dropbear+OpenSSH: share keys

I have set an encrypted LVM partition on my personnal server (Debian Jessie). So everytime I need to reboot it, I have to connect to dropbear which is installed in initramfs, unlock the disk, close connection and then, once the server has started,…
n00dl3
  • 133
  • 6
3
votes
2 answers

AWS CloudFormation give EC2 instance SSH Keys to other servers

I'm creating an EC2 instance using CloudFormation. The first thing I want to do is checkout a git repository containing puppet manifests. To do this I need an SSH key. What is the best way to get the key on to the server? This is what I've…
DanielM
  • 147
  • 1
  • 8