The officially official Devuan Forum!

You are not logged in.

#1 2023-07-31 20:35:26

ziomario
Member
Registered: 2023-07-31
Posts: 5  

Bad owner or permissions on /home/ziomario/.ssh/config

Hello to everyone.

I've installed Devuan 4 chimaera on my Google / Samsung Arm Chromebook. What I'm trying to do is to install and configure openssh-server. I've configured it like this one :

apt install openssh-server

gedit /etc/ssh/sshd_config :

Include /etc/ssh/sshd_config.d/*.conf

PermitRootLogin yes
ChallengeResponseAuthentication no
UsePAM yes

AllowAgentForwarding yes
AllowTcpForwarding yes
X11Forwarding yes
PrintMotd no
PrintLastLog yes
AcceptEnv LANG LC_*
Subsystem	sftp	/usr/lib/openssh/sftp-server

and then I did :

# service ssh restart

I want to inform you that inside the directories /home/marietto and /root there isn't any .ssh directory. Now,on my Workstation I do :

ziomario@Z390-AORUS-PRO-DEST:~$ ssh -Y marietto@192.168.1.6

where 192.168.1.6 is the IP assigned to the Chromebook (it is connected through the wi-fi network),but I get the following error :

Bad owner or permissions on /home/ziomario/.ssh/config

How can I fix this error ? I tried different solutions like this :

mkdir /home/marietto/.ssh
chmod 700 /home/marietto/.ssh
chmod 600 /home/marietto/.ssh/*

but it didn't work. I want also inform you that I'm able to connect to the ssh server if I do :

ssh -Y marietto@192.168.1.6

while I stay on the Chromebook.

Last edited by ziomario (2023-07-31 20:39:53)

Offline

#2 2023-07-31 21:50:21

Dutch_Master
Member
Registered: 2018-05-31
Posts: 277  

Re: Bad owner or permissions on /home/ziomario/.ssh/config

Actually, there is a .ssh directory in your home folder. But the dot in front of it means it's hidden.

However, now that you've borked the standard install by overwriting the directory, you should purge openssh-server and then re-install it.

apt purge openssh-server && apt install openssh-server

Next, check the ssh directory is there:

ls -al /home/ziomario

A list of files and directories will appear, one of which will be .ssh/, note the dot in front!

The next step is checking the config file is present too:

ls -al /home/ziomario/.ssh/

Another list appears and it should contain the config file.

Report back when you've reached this stage. smile

Offline

#3 2023-07-31 22:00:28

ziomario
Member
Registered: 2023-07-31
Posts: 5  

Re: Bad owner or permissions on /home/ziomario/.ssh/config

Thanks. There was a permission error on the workstation pc,on the directory /root. The permissions should have been root (root) : read and write : group = root : access = nothing ; other access = nothing ; but they weren't like that. I've fixed them and the ssh error is gone away.

Last edited by ziomario (2023-07-31 22:01:49)

Offline

#4 2023-08-01 16:17:23

chris2be8
Member
Registered: 2018-08-11
Posts: 265  

Re: Bad owner or permissions on /home/ziomario/.ssh/config

ziomario wrote:
ziomario@Z390-AORUS-PRO-DEST:~$ ssh -Y marietto@192.168.1.6

where 192.168.1.6 is the IP assigned to the Chromebook (it is connected through the wi-fi network),but I get the following error :

Bad owner or permissions on /home/ziomario/.ssh/config

The message probably refers to /home/ziomario/.ssh/config on the system you are connecting from, not on the destination.

My advice to anyone with a similar problem would be to try ssh -v which would produce a lot more messages from ssh, which should tell you enough to solve the problem. If still stuck post *full* output here which should give us enough information to work out what the problem is.

I learnt that debuging ssh problems at work (although we had enough different OSes and ssh versions thatgetting them all to work properly took quite a while).

Offline

Board footer