Check perms on the ~/.ssh/authorized_keys file on the server side (should be 0600) and the ~/.ssh dir itself?
Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
Have you confirmed that the public keys exist on the remote server in your .ssh
directory? Are the permissions correct?
I'll have to check when I get off work. I never have any errors when copying my id so I am not sure why they wouldn't be there but I will check
Same. I've never had it screw up before, but the only thing I can imagine is that something's not right with the keys.
As an aside, I did recently create a new server, and somehow managed to completely ignore the errors in ssh-copy-id
. Turns out I forgot to use -m
(to create my home directory) in useradd
when I went to create my personal account. Oops!
Also: Make sure that the user you ran “ssh-copy-id” against on the remote machine is also the user you’re trying to log in with.
Try running this command on your target system:
cat $HOME/.ssh/authorized_keys
Does the private key part of your key pair show up in the list?
How many private keys do you have in your client machine? Sometimes people generate a new key par but there's a previous one on the system that gets served before the right one. Go into your .ssh
directory in the client and check if there's anything else there.
did you verify to use the correct corresponding private key?
You can specify the keyfile with the -i option if i remember correctly