On 1/8/24 01:41, Nuno Silva wrote:
On 2024-01-08, the...@sys-concept.com wrote:

On 1/6/24 20:09, the...@sys-concept.com wrote:
I installed openssh server on Windows 11 and tried to ssh to it
using the id_rsa.pub key
but I didn't have luck.  I copied the key to .ssh\authorized_keys file.
On linux the last line ending with "\"  on Windows Notepad replaces
it with the "+" sign.

ssh with password is working  but windows doesn't recognize the
public key or maybe it is wrong directory  C:\Users\Garry
Server\.ssh\authorized_keys

Trying to run: "ssh -vv" I get:

debug1: Authenticating to 10.0.0.130:22 as 'Glen Server'
debug1: load_hostkeys: fopen /home/joseph/.ssh/known_hosts2: No such
file or directory

Where is it taking the : "known_hosts2" in home directory .ssh/ I only
have file "known_hosts"
In /etc/ssh/sshd_config (computer ssh is initiated from) I can not
find any reference to "known_hosts2"

Nor, windows \ProgramData\ssh\sshd_config contain any reference to
"known_hosts2"

I think the file to check would be ssh_config on the client side, not
sshd_config. But it's possible it's not mentioned there either, as it
seems to be part of the default at least in some systems, see for
example

The ssh_config on the client side id default, never changed anything in it.
https://serverfault.com/questions/1091575/why-does-ssh-think-i-still-have-a-known-hosts2-file

This is just the usual approach of a user-specific file not existing
unless it is created. I'd say you can just ignore this message and focus
on the verbose messages about the authentication mechanisms.

In the link above the suggest fix for "...fix $HOME/.ssh/known_hosts2: No such file 
or directory"
to add "UserKnownHostsFile ~/.ssh/known_hosts"
I tried to add it to sshd_config but ssh wouldn't even start.

The above error message it just might be the noise, linux to linux all 
connections work, it is just linux to windows it is not working.


Reply via email to