SSH config /localhost and remote?

I've read on ssh, and I have my setup to use ssh with OpenWrt, I use key in .ssh + my config file in .ssh but if I want to use also ssh server as localhost, what I've read is that I should setup also in .ssh/config.

I'm not sure how to use both?

could you help me?
thank you

Can you more clearly explain?

What does this mean?

When you login to the server, you are localhost.

Are you saying that you wish to use password login too?


I use ssh for my router / openwrt
I have id_ed25519 pub key in .SSh
But if I want to setup ssh server on my PC also with login from id_ed25519, can I put the keys and config elsewhere or i need to put that in .ssh too.
I don't want interference :wink:

To be clear, this isn't related to OpenWrt then?

You would follow the instructions of the Linux distribution installed on your PC.

1 Like

Run the following on the OpenWrt router, replacing pcip with the correct IP address of your PC. You will need to enter the root password of the PC (once) to upload the dropbear public key.

cp /etc/dropbear/dropbear_rsa_host_key /root/.ssh/id_dropbear
dropbearkey -y -f /etc/dropbear/dropbear_rsa_host_key | grep -v 'Public\|Finger' | ssh root@"$pcip" 'cat >> /root/.ssh/authorized_keys'
ssh "$pcip"

To be clear, this is not the correct location in some Linux distributions, hence I mentioned checking with the distro (and not the OpenWrt forum).

For example, in Ubuntu where the root account is "disabled", it's /home/<user>/.ssh/authorized_keys - assuming the OP installed and configured a SSH server for the distro that uses that.


Мy apologies. Wrong assumptions based on long experience with Red Hat Linux distributions.