Re: ssh bug known_hosts?
On Wed, Mar 01, 2023 at 02:43:38PM -0700, Charles Curley wrote:
> On Thu, 2 Mar 2023 03:48:49 +0800
> jeremy ardley <jeremy@ardley.org> wrote:
>
> > 2. The known hosts file used is /etc/ssh/known_hosts rather that
> > ~/.ssh/known_hosts - which causes a permissions error
>
> I am not seeing that, for either root or my regular non-root user.
>
> You indicated you created your ~/.ssh/config as shown in your email. I
> would check the configuration files in /etc/ssh.
It would be worth checking the permissions and ownerships.
unicorn:~$ namei -l ~/.ssh/config
f: /home/greg/.ssh/config
drwxr-xr-x root root /
drwxr-xr-x root root home
drwxr-xr-x greg greg greg
drwxr-xr-x greg greg .ssh
-rw-r--r-- greg greg config
Either that, or something like:
unicorn:~$ ls -ld / /home ~ ~/.ssh ~/.ssh/config
drwxr-xr-x 29 root root 4096 Jan 24 07:17 //
drwxr-xr-x 14 root root 4096 Jan 11 2018 /home/
drwxr-xr-x 227 greg greg 53248 Mar 1 15:01 /home/greg/
drwxr-xr-x 3 greg greg 4096 Apr 18 2021 /home/greg/.ssh/
-rw-r--r-- 1 greg greg 525 Apr 25 2015 /home/greg/.ssh/config
I find the second one more readable, but the first one is definitely
easier to type. Either way, make sure the permissions are *correct*,
which is to say, there should not be a world-write or group-write bit
on any line of the output.
Reply to: