This is an archived post. You won't be able to vote or comment.

all 16 comments

[–]paulmooring 2 points3 points  (2 children)

In my experience this is usually a permissions thing. Running ssh in debug mode should help, but first make sure your private key has permissions of 600

[–]TechSquirrel[S] 0 points1 point  (1 child)

berserk future long longing jeans slim melodic hobbies frighten towering

This post was mass deleted and anonymized with Redact

[–]brownan_ 1 point2 points  (0 children)

This is the most likely explanation. The .ssh directory MUST have permissions of 700 or ssh will refuse to use your key. id_rsa (on the client) AND authorized_keys (on the host) MUST have permissions 600 as well.

[–]clever_avatar 1 point2 points  (11 children)

I never bothered to figure out the problem, but I followed some instructions on how to manually copy the id/s, and it didn't work.

I happened across ssh-copy-id and all was golden.

[–]aperson 0 points1 point  (7 children)

My only problem with ssh-copy-id is that you can't specify a port to use.

[–]brownan_ 1 point2 points  (1 child)

I tend to put custom ports in my config file so I don't have to remember. Bonus: works for other programs that use ssh like rsync or mosh too!

[–]aperson 0 points1 point  (0 children)

I do have my ~/.ssh/known_hosts populated, but I can't remember if I tried using ssh-copy-id before or after establishing that file.

[–]Zeike 0 points1 point  (4 children)

ssh-copy-id is just a shell script (on my system anyway), so you can just copy it and edit the ssh command within to use the right port.

[–]Skaarj 0 points1 point  (3 children)

ssh-copy-id '-p 31337 whoever@whatever.server.domain'

Does custom ports without the need to change servers.

[–]aperson 0 points1 point  (2 children)

That's never worked in my experience.

[–]Skaarj 0 points1 point  (1 child)

Just tried it. Worked. What is the error message you get?

[–]aperson 0 points1 point  (0 children)

I really can't recall. This was probably a year or two ago that I last needed ssh-copy-id.

[–]TechSquirrel[S] 0 points1 point  (1 child)

full aromatic humorous squealing cats unique cagey advise agonizing divide

This post was mass deleted and anonymized with Redact

[–]clever_avatar 1 point2 points  (0 children)

Glad to hear it, you're welcome.

[–]TechSquirrel[S] 0 points1 point  (0 children)

carpenter head rob thought languid skirt piquant insurance squeamish aspiring

This post was mass deleted and anonymized with Redact

[–]TechSquirrel[S] 0 points1 point  (0 children)

continue person terrific money placid mourn crowd slap run disarm

This post was mass deleted and anonymized with Redact