I thought I would post here first since there may be something unique about the system.
What’s driving this is my desire to to be able to sftp into the user-data account from the dolphin file manager, meaning I don’t have to ssh in from my user account, su user-data so I can edit the files in /home/user-data/www/default. This works fine for my user account steve, connecting to many servers.
When I execute this command ssh example.com
from my local desktop account user-data, I’m getting this error:
[user-data@T480 ~]$ ssh example.com
user-data@example.com: Permission denied (publickey).
The only example.com /var/log/auth.log line for the attempt look like this:
Sep 19 16:05:04 box sshd[4273]: Connection closed by authenticating user user-data 74.124.xxx.xxx port 8889 [preauth]
...
My takeaway is the connection is somehow disconnected by the user user-data.
Background:
FWIW, my local environment is Arch Linux, KDE Plasma, using Konsole and Dolphin.
As is my usual practice, I share my ~/.ssh directory to my other local desktop accounts, so in this case copied /home/steve/.ssh to /home/user-data/.ssh, setting permissions correctly. So, user-data has the same keys that my working desktop user steve has.
The example.com /etc/ssh/sshd_config has these key lines set:
Include /etc/ssh/sshd_config.d/*.conf
PermitRootLogin no
AllowUsers steve user-data
PubkeyAuthentication yes
PasswordAuthentication no
PermitEmptyPasswords no
KbdInteractiveAuthentication no
UsePAM yes
X11Forwarding yes
PrintMotd no
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
As you can see, I added my user user-data to the AllowUsers line, and restarted sshd.
Any ideas for how to allow my local user-data account to connect to my MIAB server?
Thank you in advance.
Steve.
Update: Discovered that ssh user-data@example.com
won’t even work without using keys! So, the keys may have nothing to do with this! However, from the user-data desktop account, I can do ssh steve@example.com
just effing fine, so keys are fine. WTH.