this post was submitted on 24 Mar 2024
8 points (90.0% liked)
raspberrypi
3255 readers
2 users here now
Community about the single-board computers, micro-controllers and related projects.
Other RaspberryPi communities on Lemmy
founded 4 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Not quite sure I understand what you want...
Each client, the devices you ssh from, has a key pair. You take the public key part of that pair and put it in the authorized_keys file on the server, the device you ssh to. The cannonical paths for your keys and authorized_keys is ~/.ssh/
You say you cannot reach your pi from your phone? Find the key file named something .pub on your phone, add it to the authorized_keys (as a single line in that file) on your pi. That is it.
If you also want to drop the username you need to add something like this to your .ssh/config on your phone:
Does this help?
Thanks I tried adding the second ssh pub key to my servers authorized keys, but now it tells me that because the user name is different it wont let me connect
Ssh -l username, iirc.
Thanks I'll try that tomorrow and report back if it worked.