context:
- firstly, i got a new ubuntu 20.04 server with a password
- I'm using OpenSSH client on Windows 10
- I want to do passwordless login, then I
- ssh to server using passwords,
- manually create
~/.ssh /authorized_keys
and open it invim
- copy&paste my public key content from my
C:\users\me\.ssh\id_rsa.pub
to ssh window. - exit that ssh session and try to passwordless login,
- failed
- (some more tries and many headbang) š¤
- I install Git Bash On Windows, then run
ssh-copy-id
and got another identical line inauthorized_keys
on the server - now I could successfully passwordless login to server
Why this happen? Does ssh-copy-id
do more thing than just insert a line in (server) ~/.ssh/authorized_keys
?