Questions tagged [authorized-keys]

63 questions
525
votes
32 answers

Adding a public key to ~/.ssh/authorized_keys does not log me in automatically

I added the public SSH key to the authorized_keys file. ssh localhost should log me in without asking for the password. I did that and tried typing ssh localhost, but it still asks me to type in the password. Is there another setting that I have to…
user482594
  • 16,878
  • 21
  • 72
  • 108
148
votes
34 answers

Git Remote: Error: fatal: protocol error: bad line length character: Unab

I set up a git server and want now to push initially my repo from the client. I used git push origin master and get this error message: fatal: protocol error: bad line length character: Unab I don't know what's wrong. I don't know what "Unab" is. I…
user437899
  • 8,879
  • 13
  • 51
  • 71
129
votes
5 answers

How to add RSA key to authorized_keys file?

I've created an RSA public key and I want to add that to authorized_keys file, but there is no such file in my Ubuntu 11.10 machine. How can I add the key to authorized_keys?
Raji A C
  • 2,261
  • 4
  • 26
  • 31
57
votes
6 answers

How to append authorized_keys on the remote server with id_rsa.pub key

How to append authorized_keys on the remote server with id_rsa.pub key from the local machine with a single command?
shilovk
  • 11,718
  • 17
  • 75
  • 74
18
votes
6 answers

Is it possible to use Ansible authorized_key exclusive with multiple keys?

I'm fairly new in using Ansible and have been reading here and google and haven't found an answer yet. My scenario is that I have 1 user on a server but 2-3 different pub keys that need to put in it's authorized_keys file. I can successfully remove…
Valien
  • 1,125
  • 2
  • 17
  • 38
9
votes
2 answers

Ansible - how to concatenate files contents into a variable

How can I concatenate a contents of several files into a variable? Here's the problem: I'm trying to set public keys for a user on a remote machine. The example from the authorized_key documentation that almost works: - name: Set up authorized_keys…
Ikar Pohorský
  • 4,617
  • 6
  • 39
  • 56
9
votes
4 answers

Can't open ssh/authorized_keys of user

I know this may be trivial for some of you. I'm not a linux expert, and I'm trying to play around with git. To do so I wanted to try to add my public SSH key to the ~/.ssh/authorized_keys of my user git. the problem though is that when I login with…
Thoma Biguères
  • 1,136
  • 4
  • 18
  • 42
5
votes
0 answers

CentOS 7 - sshd: Permission denied on authorized_keys if the users home folder is on another partition

I have an issue that drives me crazy... I try to fix it for at least 2 hours now - and I was not very successful. Issue itself: I installed CentoS7 (I don't know if it's a CentOs 7 specific behaviour) on a VM that is supposed to host our git and…
winem
  • 68
  • 1
  • 6
4
votes
1 answer

authorized_keys getting deleted from Google Cloud VM

I am trying to set up Jenkins for software hosted in Google Cloud VM. I have a VM with user account A and user account B. Jenkins is hosted in user account A. All the other softwares are hosted in user account B. In order to authorize Jenkins to ssh…
Samson
  • 1,336
  • 2
  • 13
  • 28
4
votes
1 answer

Amazon AWS EC2 Deleted Key Locked out of Root

I am running an Ubuntu instance on Amazon AWS EC2. I have a root user named ubuntu. I also have another user named ellis. My ubuntu user is the administrative user that has the control of all other users and creating files and directories in the…
4
votes
1 answer

Setting ssh public keys on Docker image

I setup a Docker image that supports ssh. No problem, lots of examples. However, most examples show setting a password using passwd. I want to distribute my image. Having a fixed password, especially to root, seems like a gaping security hole.…
EricGreg
  • 1,098
  • 1
  • 10
  • 18
4
votes
1 answer

Check identity of remote-user after password-less ssh-login?

After password-less ssh-login, is there any way in Linux to retrieve the identity of the remote-user that logged in? I would like to take some different actions in the login-scripts, depending on from which remote host/userid I do ssh-login.
Rop
  • 3,359
  • 3
  • 38
  • 59
4
votes
2 answers

Gitolite usernames in authorized_keys file

I'll try to explain my scenario the best I can: I'm using gitolite in a debian squeeze server and there are 3 users who can access and work with the repositories: alex@workbox alex@homebox katy@workbox The above are the corresponding usernames…
Roland Pish
  • 815
  • 1
  • 9
  • 21
3
votes
3 answers

Transparent ssh connection forwarding to a docker container

I want to have a server to transparently forward an incoming ssh connection from a client to a docker container. This should include scp, git transport and so forth. This must work with keys, passwords are deactivated. The user should not see the…
bitmask
  • 32,434
  • 14
  • 99
  • 159
3
votes
2 answers

Check authorized_keys to see which key was used for pushing the commit

Say there's a large list of ssh public keys in ~/.ssh/authorized_keys on a server with Git repositories, with a general format of " user@mail.com" I want to write bash script for the pre-receive hook, that checks which SSH key was used to push the…
Ankit
  • 155
  • 1
  • 13
1
2 3 4 5