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
1
vote
1 answer

Why can I ssh logon without key or password? How do I stop this?

I have just discovered I can log into my server as long as I provide a missing file to the ssh client! What can I check to find out why and what can I change to stop this from happening? Logging in with missing file $ ssh -i ~/.ssh/x…
G-.
  • 140
  • 9
1
vote
1 answer

Managing Host Keys in a Cloud World

I'm a big fan of Ansible and Terraform because I can bring VMs up and down and put them left and right. However, as I'm working I'm constantly asked to affirm that I trust some newly created host in my inventory's host keys. I could just turn off…
Breedly
  • 250
  • 2
  • 8
1
vote
0 answers

How to manage SSH accounts for specific users?

I've several users that they connect to my Server from their clients(Specific Clients) over the SSH, so I generate for them AuthorizedKeys. Now I've two Users, UserA and UserB, I want to these users could be able to connect to my Server with any…
Freeman
  • 121
  • 4
1
vote
1 answer

Will converting format of private ssh key affect server?

I'm interested in setting up some basic security on an ubuntu 16.4 vps that I'm working on. I'm reading through https://www.codelitt.com/blog/my-first-10-minutes-on-a-server-primer-for-securing-ubuntu/ and…
user1592380
  • 145
  • 7
1
vote
1 answer

Determine SSH authentication method before disabling SSH password auth

I'd like to write an automation script that sets PasswordAuthentication no in /etc/ssh/sshd_config. However, I wan't to guard against locking myself out in case I run the script while being logged in via SSH and password authentication. Is there a…
chiborg
  • 1,083
  • 2
  • 13
  • 27
1
vote
3 answers

ssh key passphrase wrong but it's right

I can't use my ssh id_rsa/id_rsa.pub keys because looks like ssh thinks that entered passphrase is wrong. But I'm sure that it's right. Here is how it looks: ssh myuser@myhost_ip -i ~/.ssh/id_rsa.pub The authenticity of host 'myhost_ip (myhost_ip)'…
user1858864
  • 225
  • 3
  • 5
  • 13
1
vote
1 answer

ssh keys google cloud

I'm trying to use google cloud to make my own SFTP server, the problem is I don't know how to properly use the ssh keys, everytime I try to connect with a ssh key the VM rejects it, any help? I'm using PuTTYgen to generate keys and WinSCP to upload…
user389152
1
vote
1 answer

Linux to Windows SSH authorized_keys

I want to connect into a Windows Box from my Ubuntu PC via ssh using key authentication but I don't know how to do it. I've tried to send the id_rsa.pub to Windows and then rename it to authorized_keys (placing this file into the…
1
vote
1 answer

sshPublicKey Attribute not showing - OpenLDAP PHPLDAP SSH Key Auth

I have imported from what I can tell successfully the sshPublicKey schema but the attribute doesn't show in PHPLDAPADMIN. Anybody have any experience with this issue? What I did verbatim : sudo nano openssh-lpk.ldif dn:…
FreeSoftwareServers
  • 515
  • 1
  • 8
  • 26
1
vote
1 answer

SSH: no port[s] to connect to

I can connect to machine m2 by logging in to m1 first: [laptop]$ ssh ubuntu@m1.com [m1]$ ssh ubuntu@m2.com [m2]$ # i'm in! Both machines use SSH key to log in (not passwords), and it works. But when I try to automate this with SSH proxying, by…
user124114
  • 121
  • 4
1
vote
1 answer

CentOS - Pubkey Auth doesn't work for user in /var

I've been working through a problem for the past week or so and I am running out of ideas. I added a new user on my Centos 7 VPS for a git server, and (under the advice of several articles) placed the user's home directory inside /var instead of…
forresthopkinsa
  • 185
  • 1
  • 10
1
vote
2 answers

authorized_keys and with_items in Ansible

I'm trying to create new users and populate their ~/.ssh/authorized_keys file using Ansible. Here's my task: - name: Create user account user: name="{{ item.username }}-ns" comment="{{ item.realname }}" groups=adm,sudo, append=yes …
imlepid
  • 175
  • 1
  • 3
  • 10
1
vote
1 answer

Ansible deploy multiple authorized_keys on multiple hosts

We need deploy keys on the servers, but trick is that the keys are many and do not all of them must have deploy on all servers. Now we do it follows: in vars roles/authorized_keys/vars/main.yml ssh_users: - name: bob key: "{{ lookup('file',…
artful
  • 31
  • 1
  • 7
1
vote
1 answer

SSH jump box with private keys on jump box

I basically want to do what is explained in this serverfault question, so I want a group of people ("admins") be able to login in to many hidden servers with ssh using a jumpbox which stores the private keys for the hidden servers. As updating the…
steiny
  • 173
  • 2
  • 8
1
vote
1 answer

Synology NAS ssh key auth not working

I follow the directions here on how to setup ssh key auth on my synology NAS. These are typical linux configurations so nothing special; I include the link for reference. This gets me ssh root@ but what I want is user specific login. So, I…