Ssh configuration not fully baked?

Hi there,

I have been trying to setup an omnia without much success: the router eventually installed and updated itself after a couple of factory resets but I see nothing listening on port 22 despite configuring the “avanced” root password. I tried to run a couple of custom commands to debug this:

/usr/sbin/sshd -d

/etc/ssh/sshd_config: No such file or directory

ls -al /etc/ssh

drwx------ 1 root root 344 Aug 21 16:19 .
drwxr-xr-x 1 root root 1760 Aug 21 16:07 …
-rw-r–r-- 1 root root 553185 Aug 14 19:22 moduli
-rw------- 1 root root 1553 Aug 14 19:22 ssh_config
-rw------- 1 root root 668 Aug 21 16:19 ssh_host_dsa_key
-rw-r–r-- 1 root root 601 Aug 21 16:19
-rw------- 1 root root 227 Aug 21 16:18 ssh_host_ecdsa_key
-rw-r–r-- 1 root root 173 Aug 21 16:18
-rw------- 1 root root 399 Aug 21 15:40 ssh_host_ed25519_key
-rw-r–r-- 1 root root 93 Aug 21 15:40
-rw------- 1 root root 1675 Aug 21 16:17 ssh_host_rsa_key
-rw-r–r-- 1 root root 393 Aug 21 16:17

How come that configuration file was not installed ? Is there a way to force it to be installed ?

Any help would be most welcome :slight_smile:

Why do you think that command is a good way to run the ssh server? It has standard init scripts, etc.

There’s clickable table in <address>/cgi-bin/luci/admin/system/startup

because it does not work and I have been trying to find out why:

/etc/init.d/sshd start

Command failed (Code: 256)

and because, obviously, if you do not have an sshd_config file, nothing sane will make sshd start

I see that there is an sshd process running: /usr/sbin/sshd -f /var/etc/ssh/sshd_config

and the /var/etc/ssh/sshd_config file contains this:

cat “/var/etc/ssh/sshd_config”

auto-generated config file from /etc/config/sshd

PermitRootLogin yes
AuthorizedKeysFile .ssh/authorized_keys
Subsystem sftp /usr/lib/sftp-server

and that sshd is indeed listening on port 22:

sshd 19696 root 3u IPv4 41571 0t0 TCP *:ssh (LISTEN)
sshd 19696 root 4u IPv6 41573 0t0 TCP *:ssh (LISTEN)

I guess the firewall does not open port 22 by default ?

I didn’t touch ssh config IIRC, I don’t have that file and it just works (I checked all that over ssh).

If you did factory reset. You should set the system password first [ guide: ] [ foris: ] . After that you should be able to use ssh(as root) from local network.

Bwaaah :confused:

This was caused by my local ssh_config file which was setup to forward all ssh connections through an external ssh gateway which obviously had no business accessing

Dumb me.

thank you for your help