SSH keypair authentifcation

I am trying to connect to my BBB via ssh-keypair-authentifcation (from my Windows machine). The regular user/pwd-login works, but somehow I’m stuck with the keypair method. My aim would be to connect to the static IP-address of my BBB ( resp. USB ( with keypair (as the user ubuntu).

I have on my Win-machine TeraTerm as SSH-client installed. I can generate on my Win-machine a keypair. To my understanding I should now put the public key ( on my BBB and use the private key as authentication. But this fails somehow cause I guess I’m missing some essential points.

For the case via USB I try something

ubuntu@BBB:~$ ssh-copy-id -i ubuntu@

I get an endless blinking cursor. I guess I need to verify my credentials but this fails. And I wonder anyway how the ssh should know which public-file to use. Could somebody please help and give me a hint what to do with the public-key-file?

My second question is the curiosity reg. the pub-key-file. For the login procedure I specify only the private-key file. How does the host (BBB) know from where to take the pub-key-files? To my understanding they are stored per each user which would mean, that the ssh scans through each user-dir (what I doubt).

And last question: Can I use the same (public) key for different connections? Namely to use it for USB-connection as well as for eth0-connection.

Help would be really appreciated …

You have to run the ssh-copy-id in the machine you are connecting *from*
(client machine), not what you are connecting *to* (server machine) ,
this case the BBB.

Alternatively, you can generate the keypair in the client machine and
copy the .pub manually and put it into the authorized_keys in the
server, usually ~/.ssh/authorized_keys


Thx, that was the missing part. And in TeraTerm its little bit weird cause it accepts also NO username but this is nonsense cause you need to login with a user.

Anyway, thx for the missing link.