[SOLVED] Problem with passwordless SSH

Hello Turris Community,
I am happy to finally own a Turris router Omnia Wifi 6. I’ve always wanted one. At the moment I am setting it up analog to my previous OpenWRT router.
So far I have managed everything. I think the Foris GUI is great, but I also do some things in Luci or in the shell.
I now have a problem. I would like to log in from my Linux computer via SSH without a password. That doesn’t work. I do it the same way as with my other OpenWRT devices.
I save my rsa or ed25519 key in /etc/dropbear/authorized_keys on the Turris router. But now the command ssh root@192.168.1.1 still requires a password?
What am I doing wrong? Does it behave differently on a Turris router than on a native OpenWRT?

I am brand new to Turris OS and also have no experience witnWRT.

I put my id_rsa.pub in /root/.ssh/authorized_keys and passwordless ssh works fine.

3 Likes

Ok yes that works for me too, I had to create “authorized_keys” first and also the .ssh folder.
This is how it works with normal Linux distributions. So far it worked with my OpenWRT router via “Dropbear” and just via the path under /etc/dropbear. Since there was no .ssh folder in the /root of the Turris router so far, but the path /etc/dropbear, I thought it should also be solved via this.
Thank you for your help.

TurrisOS is not limited in disk space - dropbear is a very lightweight ssh-server and thus is a good choice for small router partitions. TurrisOS instead uses standard openssh, folder and configuration files can be found within /etc/ssh/. Public key shall be saved within /etc/ssh/authorized_keys and configuration file /etc/ssh/sshd_config modified accordingly.

Thank you for the information but in my case for user “root” it is in /root/.ssh/authorized_keys right? In /etc/ssh I think only host based stuffs or?

I thought standard installation folder is /etc/ssh/ and therefore the configuration file points to /etc/config/authorised_keys. Therefore I do not know how putting it in /root/ worked for you.
Did you change configuration file?

Out of the box openssh for every unix like OS that I have used looks for the .ssh directory in $HOME which for root on Turris OS is in /root.

2 Likes

@ ssdnvv
No I did not change any configuration file. It works with the authorization_keys in /root/.ssh. Everything is fine now :blush:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.