I often mess up when I manually set up the .ssh -dir, easy to forget some flag. I often need to create a new user and only allowing access with SSH, how can I do that? Basically, I want to stop doing this
"# mkdir .ssh; cd .ssh; ssh-keygen; cat myKey > authorized_keys; cd ..; chown go-r; scp .ssh/myKey friend@IP' etc", I am sure I even now did some mistake somewhere -- I am pretty sure some command such as ssh-copy-id may be a solution here, at least it fixes the perms with .ssh when used rightly.
Want something like this, perhaps with ssh-copy-id?
# adduser tester # ssh-key-gen docs # ssh-copy-id docs /home/tester/ # not working, how to do this easily?
and then on client side
$ eval `ssh-agent` $ ssh-add ~/.ssh/docs $ ssh tester@IP
that should give the access to the repo with the priv -key.