SSH access lost after migration

Hardware: Old laptop or computer
YunoHost version:
I have access to my server : through the webadmin | direct access via keyboard / screen

Description of my issue

Hi there,

I migrated my server to a new laptop, all is working except SSH.

I had set up ssh key-only access. It now times out.

The method for migration was a full yunohost backup + restore before post-installation on the new server.

Maybe important details:

  • there was an architecture upgrade from i686 to x86_64
  • the original installation method was curl | bash on Buster
  • the installation on the new server was from a yunohost pen drive

Already tried out suggestions on similar topics here on the forum.

yunohost user permission list

shows no users allowed to use ssh.main

yunohost user permission add ssh.main admin


Error: The group ‘admin’ is unknown

sshd -T


‘Match Group’ in configuration but ‘user’ not in connection test specification.

yunohost user ssh list-keys admin


Traceback (most recent call last): 
File "/usr/bin/yunohost", line 72, in <module> parser=parser 
File "/usr/lib/moulinette/yunohost/", line 25, in cli ret = moulinette.cli(args, output_as=output_as, timeout=timeout, top_parser=parser) 
File "/usr/lib/python3/dist-packages/moulinette/", line 131, in cli args, output_as=output_as, timeout=timeout 
File "/usr/lib/python3/dist-packages/moulinette/interfaces/", line 496, in run ret = self.actionsmap.process(args, timeout=timeout) 
File "/usr/lib/python3/dist-packages/moulinette/", line 599, in process return func(**arguments) 
File "/usr/lib/moulinette/yunohost/", line 1316, in user_ssh_list_keys return yunohost.ssh.user_ssh_list_keys(username) 
File "/usr/lib/moulinette/yunohost/", line 19, in user_ssh_list_keys user["homeDirectory"][0], ".ssh", "authorized_keys" 
KeyError: 'homeDirectory'

In the server terminal I can log I as “admin” and “root” with no issues.
The key for “admin” which is the one I was using is in /home/admin/.ssh/authorized_keys as expected.

I also tried reactivating ssh password access but connection times out all the same.

Iptables/fail2ban is clear

I’m guessing the different instalation method may have caused this, but would like to check before retrying the migration.

Any idea what to do here?


A reboot solved it. :person_facepalming: :grin:


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