Не получается настроить вход SSH по PubkeyAuthentication

Автор kol1978, 11 октября 2024, 09:32:33

« назад - далее »

0 Пользователи и 1 гость просматривают эту тему.

kol1978

Вход по паролю работает но если его отключить и включить "Авторизация по ключу" то подключиться не получается.
Цитироватьkol@kol-VirtualBox:~$ ssh-copy-id kol@192.168.0.23
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/kol/.ssh/id_ed25519.pub"
The authenticity of host '192.168.0.23 (192.168.0.23)' can't be established.
ED25519 key fingerprint is SHA256:YA3380bFvenfXQE3eMm8kS6kJHVzIsoFpbzLJnM4kyE.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
kol@192.168.0.23's password:

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh 'kol@192.168.0.23'"
and check to make sure that only the key(s) you wanted were added.

kol@kol-VirtualBox:~$ ssh kol@192.168.0.23
kol@192.168.0.23's password:

ihammers

Несколько вопросов:
  • запущен ли ssh-agent?
  • как генерировали ключ?
  • как что меняли на машине 192.168.0.23 в конфигурационных файлах sshd?
Debian GNU/Linux Bookworm, LXQt/OpenBox: AMD Ryzen 5 5600G / 64Gb RAM
_______________________________
Debian GNU/Linux Bookworm, без графики: AMD Phenon X4 / 16Gb RAM
_______________________________
Debian GNU/Linux Bookworm, LXQt/OpenBox: Acer Aspire One 722 AMD C60 / 8Gb RAM / ATI HD6290

Лия

$ ssh -i /home/kol/.ssh/id_ed25519 -v kol@192.168.0.23
работает? если нет, что пишет?

kol1978

#3
Цитата: ihammers от 11 октября 2024, 19:20:33Несколько вопросов:
  • запущен ли ssh-agent?
  • как генерировали ключ?
  • как что меняли на машине 192.168.0.23 в конфигурационных файлах sshd?

На все вопросы да!
Цитироватьkol@kol-VirtualBox:~/.ssh$ ssh-copy-id kol@192.168.0.26
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/kol/.ssh/id_ed25519.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
kol@192.168.0.26's password:

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh 'kol@192.168.0.26'"
and check to make sure that only the key(s) you wanted were added.

kol@kol-VirtualBox:~/.ssh$ sudo su
root@kol-VirtualBox:/home/kol/.ssh# mc
  здесь меняю    sudo no /etc/ssh/sshd_config   ->      PasswordAuthentication no
root@kol-VirtualBox:/home/kol/.ssh# exit
exit
kol@kol-VirtualBox:~/.ssh$ ssh 'kol@192.168.0.26'
kol@192.168.0.26: Permission denied (publickey,password).
По паролю входит... но если  sudo no /etc/ssh/sshd_config   ->      PasswordAuthentication no то нет так не входит!
Причем на "свежей" инсталляции какое то время входил по ключам а потом (без всяких изменений с моей стороны SSH) просто перестал входить с ключами (пришлось переключиться на вход по паролю; PubkeyAuthentication yes на сервере всегда)... ЗВЕЗДЕЦ!!! это что щас такие способы взлома существуют что ключи не приграда!?

18 октября 2024, 05:25:43
Цитата: Лия от 11 октября 2024, 21:55:57$ ssh -i /home/kol/.ssh/id_ed25519 -v kol@192.168.0.23
работает? если нет, что пишет?
это :
Цитироватьkol@kol-VirtualBox:~/.ssh$ ssh -i /home/kol/.ssh/id_ed25519 -v kol@192.168.0.26
OpenSSH_9.6p1 Ubuntu-3ubuntu13.5, OpenSSL 3.0.13 30 Jan 2024
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to 192.168.0.26 [192.168.0.26] port 22.
debug1: Connection established.
debug1: identity file /home/kol/.ssh/id_ed25519 type 3
debug1: identity file /home/kol/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13.5
debug1: Remote protocol version 2.0, remote software version OpenSSH_9.2p1 Debian-2+deb12u3
debug1: compat_banner: match: OpenSSH_9.2p1 Debian-2+deb12u3 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.0.26:22 as 'kol'
debug1: load_hostkeys: fopen /home/kol/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: sntrup761x25519-sha512@openssh.com
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:QkBX18RdKNOR7Xx0Razimheq+wbPOH0J4+6demLA28Y
debug1: load_hostkeys: fopen /home/kol/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host '192.168.0.26' is known and matches the ED25519 host key.
debug1: Found key in /home/kol/.ssh/known_hosts:1
debug1: ssh_packet_send2_wrapped: resetting send seqnr 3
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: ssh_packet_read_poll2: resetting read seqnr 3
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_ext_info_client_parse: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,webauthn-sk-ecdsa-sha2-nistp256@openssh.com,ssh-dss,ssh-rsa,rsa-sha2-256,rsa-sha2-512>
debug1: kex_ext_info_check_ver: publickey-hostbound@openssh.com=<0>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: ssh_fetch_identitylist: agent contains no identities
debug1: Will attempt key: /home/kol/.ssh/id_ed25519 ED25519 SHA256:zvc8+6hmA48hakMkVP6XMv6tjRprPnMCIy3o2d3U8OM explicit
debug1: Offering public key: /home/kol/.ssh/id_ed25519 ED25519 SHA256:zvc8+6hmA48hakMkVP6XMv6tjRprPnMCIy3o2d3U8OM explicit
debug1: Authentications that can continue: publickey,password
debug1: No more authentication methods to try.
kol@192.168.0.26: Permission denied (publickey,password).

18 октября 2024, 05:37:09
Цитироватьkol@kol-VirtualBox:~/.ssh$ ls -l
итого 16
-rwxrwxrwx 1 kol kol   0 июл 15 18:49 authorized_keys
-rw------- 1 kol kol 411 окт 18 10:08 id_ed25519
-rw-r--r-- 1 kol kol 100 окт 18 10:08 id_ed25519.pub
-rw------- 1 kol kol 978 окт 18 10:04 known_hosts
-rw------- 1 kol kol 142 окт 18 10:04 known_hosts.old
-rw-rw-r-- 1 kol kol   0 окт 12 16:08 public_key_string
kol@kol-VirtualBox:~/.ssh$ mc
но почему
Цитироватьdebug1: load_hostkeys: fopen /home/kol/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
"ssh_known_hosts2"???

на стороне сервера :
Цитироватьkol@servdebian12:~$ cd ./.ssh
kol@servdebian12:~/.ssh$ ls -l
итого 4
-rwxrwxrwx 1 kol kol 500 окт 18 10:09 authorized_keys
kol@servdebian12:~/.ssh$ pwd
/home/kol/.ssh
kol@servdebian12:~/.ssh$ ls -l
итого 4
-rwxrwxrwx 1 kol kol 500 окт 18 10:09 authorized_keys
kol@servdebian12:~/.ssh$ cat authorized_keys
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAGwAT/+T7v0wq0nShFcMNUNis78TEUxrW8F80XnH+hu kol@kol-VirtualBox
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPHFCI+e6o1FwB/+cShDsDjex+arp4+/ug3PHUfgt60U kol@kol-VirtualBox
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPHFCI+e6o1FwB/+cShDsDjex+arp4+/ug3PHUfgt60U kol@kol-VirtualBox
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF3rnmLQLet6rM33IUgC4zuDNT1Wjw3JFAf49ymb/2MJ kol@kol-VirtualBox
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGU3XZlwRTUH+xwisMuCM+W4i8pteSpJw0avVYenjsos kol@kol-VirtualBox
kol@servdebian12:~/.ssh$
много ключей потому что старые перезаписывал и посылал снова... но результата ноль!

Лия

#4
на стороне сервера выполнить
cd ~/.ssh
chmod 0600 authorized_keys

18 октября 2024, 05:44:24
и ещё
chmod 700 ~/.ssh

kol1978

#5
Почему просит пароль если "ключи"???? :
Цитироватьkol@kol-VirtualBox:~/.ssh$ ssh-copy-id kol@192.168.0.26
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/kol/.ssh/id_ed25519.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
kol@192.168.0.26's password:

Number of key(s) added: 1

Now try logging into the machine, with:  "ssh 'kol@192.168.0.26'"
and check to make sure that only the key(s) you wanted were added.

kol@kol-VirtualBox:~/.ssh$ ssh 'kol@192.168.0.26'
kol@192.168.0.26's password:
Linux servdebian12 6.10.11+bpo-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.10.11-1~bpo12+1 (2024-10-03) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Oct 18 10:05:18 2024 from 192.168.0.17
kol@servdebian12:~$


18 октября 2024, 06:00:30
Цитата: Лия от 18 октября 2024, 05:41:17на стороне сервера выполнить
cd ~/.ssh
chmod 0600 authorized_keys

18 октября 2024, 05:44:24
и ещё
chmod 700 ~/.ssh
И?
Цитироватьkol@kol-VirtualBox:~/.ssh$ ssh 'kol@192.168.0.26'
kol@192.168.0.26's password:
Linux servdebian12 6.10.11+bpo-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.10.11-1~bpo12+1 (2024-10-03) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Oct 18 10:05:18 2024 from 192.168.0.17
kol@servdebian12:~$ cd ~/.ssh
kol@servdebian12:~/.ssh$ chmod 0600 authorized_keys
kol@servdebian12:~/.ssh$ ls -l
итого 4
-rw------- 1 kol kol 100 окт 18 10:56 authorized_keys
kol@servdebian12:~/.ssh$ chmod 700 ~/.ssh
kol@servdebian12:~/.ssh$ ls -l
итого 4
-rw------- 1 kol kol 100 окт 18 10:56 authorized_keys
kol@servdebian12:~/.ssh$ sudo systemctl restart sshd
[sudo] пароль для kol:
kol@servdebian12:~/.ssh$

18 октября 2024, 06:01:51
Он пароль просит! он не должен просить пароль! Почему просит?


18 октября 2024, 06:04:05
с паролем заходит...Но как входить без пароля по ключам? почему не входит без пароля?
Цитироватьkol@kol-VirtualBox:~/.ssh$ ssh -i /home/kol/.ssh/id_ed25519 -v kol@192.168.0.26
OpenSSH_9.6p1 Ubuntu-3ubuntu13.5, OpenSSL 3.0.13 30 Jan 2024
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to 192.168.0.26 [192.168.0.26] port 22.
debug1: Connection established.
debug1: identity file /home/kol/.ssh/id_ed25519 type 3
debug1: identity file /home/kol/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13.5
debug1: Remote protocol version 2.0, remote software version OpenSSH_9.2p1 Debian-2+deb12u3
debug1: compat_banner: match: OpenSSH_9.2p1 Debian-2+deb12u3 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.0.26:22 as 'kol'
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: sntrup761x25519-sha512@openssh.com
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:QkBX18RdKNOR7Xx0Razimheq+wbPOH0J4+6demLA28Y
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host '192.168.0.26' is known and matches the ED25519 host key.
debug1: Found key in /home/kol/.ssh/known_hosts:1
debug1: ssh_packet_send2_wrapped: resetting send seqnr 3
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: ssh_packet_read_poll2: resetting read seqnr 3
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_ext_info_client_parse: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,webauthn-sk-ecdsa-sha2-nistp256@openssh.com,ssh-dss,ssh-rsa,rsa-sha2-256,rsa-sha2-512>
debug1: kex_ext_info_check_ver: publickey-hostbound@openssh.com=<0>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: ssh_fetch_identitylist: agent contains no identities
debug1: Will attempt key: /home/kol/.ssh/id_ed25519 ED25519 SHA256:zvc8+6hmA48hakMkVP6XMv6tjRprPnMCIy3o2d3U8OM explicit
debug1: Offering public key: /home/kol/.ssh/id_ed25519 ED25519 SHA256:zvc8+6hmA48hakMkVP6XMv6tjRprPnMCIy3o2d3U8OM explicit
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: password
kol@192.168.0.26's password:
Authenticated to 192.168.0.26 ([192.168.0.26]:22) using "password".
debug1: channel 0: new session [client-session] (inactive timeout: 0)
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: filesystem
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: client_input_hostkeys: searching /home/kol/.ssh/known_hosts for 192.168.0.26 / (none)
debug1: client_input_hostkeys: searching /home/kol/.ssh/known_hosts2 for 192.168.0.26 / (none)
debug1: client_input_hostkeys: no new or deprecated keys from server
debug1: Remote: Ignored authorized keys: bad ownership or modes for directory /home/kol
debug1: Sending environment.
debug1: channel 0: setting env LC_ADDRESS = "ru_RU.UTF-8"
debug1: channel 0: setting env LC_NAME = "ru_RU.UTF-8"
debug1: channel 0: setting env LC_MONETARY = "ru_RU.UTF-8"
debug1: channel 0: setting env LC_PAPER = "ru_RU.UTF-8"
debug1: channel 0: setting env LANG = "ru_RU.UTF-8"
debug1: channel 0: setting env LC_IDENTIFICATION = "ru_RU.UTF-8"
debug1: channel 0: setting env LC_TELEPHONE = "ru_RU.UTF-8"
debug1: channel 0: setting env LC_MEASUREMENT = "ru_RU.UTF-8"
debug1: channel 0: setting env LC_TIME = "ru_RU.UTF-8"
debug1: channel 0: setting env LC_NUMERIC = "ru_RU.UTF-8"
debug1: pledge: fork
Linux servdebian12 6.10.11+bpo-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.10.11-1~bpo12+1 (2024-10-03) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Oct 18 11:00:58 2024 from 192.168.0.17
kol@servdebian12:~$
kol@servdebian12:~$ cd ./.ssh
kol@servdebian12:~/.ssh$ ls -l
итого 4
-rw------- 1 kol kol 100 окт 18 10:56 authorized_keys
kol@servdebian12:~/.ssh$ cat authorized_keys
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGU3XZlwRTUH+xwisMuCM+W4i8pteSpJw0avVYenjsos kol@kol-VirtualBox
kol@servdebian12:~/.ssh$


[/quote]
а это что за идиотское сообщенгие!
Цитироватьdebug1: client_input_hostkeys: searching /home/kol/.ssh/known_hosts for 192.168.0.26 / (none)
!!???

18 октября 2024, 06:13:21
На стороне клиента ! :
Цитироватьkol@kol-VirtualBox:~/.ssh$ cat /home/kol/.ssh/known_hosts
|1|1SLT56mzSP23pXCt6NWn+uVDIMo=|4G8pEDTHHAx/xmfi7z+bMmg5OWA= ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAUgFvp6y9cUo5BOXBU7ypg1c9wjvVXnAd8HQGqw4X1p
|1|qjB1sSO38CM79N7aG4PpHczolW0=|SKdxFOTFyvPjmQi/xIFXRGoP+Mk= ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCy0VU5M8BJze5cScZg7901g1gYPQ8jiyUqPZi9j5DrSQqlASu5pYlJFga6vYqQxso8V1nm/XHJZWh4eaRujnGRDF63HcFX3tw24rQB8/bTJf1DyqWBN5zTwiFNAsOxU1bHYH6viJIb15QmMMWGE82Q2loIgreNM7oLW/R7B6iIaYUOiSRplI/o2QQN4JNdfdZ2bZEweALsuqUgGjy+y3EKO0h95YxFFCR6EY+HV8C7o0GEEYQC0DT5rfhWKlCCg75qEc5lQsbuusD/C37dVkyblalDQxM9rtAGGygoZ1383VCwanPe/eZ5VHHrddeCSH4xBa0vFYNxQnT4lOttEgvcOOfC3DSXWfUUlOqUs+2AniKLAEly6qJ4d1w79f3O4Mzfw3mPhEt973+BQI9juqTAYy6EzSLAAx5ADso4Qm+1QARkVcUouoct6HS8CKSnOt1odUNAbOvzcIWfdlgp+hYTLq6AzXA7Js3hGLM3v8E7VA1gy4QT/BZQj3w7wv5lr6c=
|1|JvtllNASqjMB4prpIzmdqD2bZkQ=|HWHuC3jpcBmWfEvu3YcDeztFuuI= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFPN36PIJgdq/DlJ4XBpUpZLaIp+qcDpjUKGKChKU0UAY8EuLbFCtmgTtDSaeFCYgDLyB1ppjuGLBPCaLwehXNE=
kol@kol-VirtualBox:~/.ssh$

Лия

#6
Цитата: kol1978 от 18 октября 2024, 05:58:08debug1: Remote: Ignored authorized keys: bad ownership or modes for directory /home/kol
На стороне сервера:
sudo chmod -v 755 /home/kol
sudo chown -v kol:kol /home/kol
После этого должно пускать без пароля

kol1978

#7
Цитата: Лия от 18 октября 2024, 07:26:33
Цитата: kol1978 от 18 октября 2024, 05:58:08debug1: Remote: Ignored authorized keys: bad ownership or modes for directory /home/kol
На стороне сервера:
sudo chmod -v 755 /home/kol
sudo chown -v kol:kol /home/kol
После этого должно пускать без пароля
делаю :
Цитироватьkol@servdebian12:~/kernel$ sudo chmod -v 755 /home/kol
sudo chown -v kol:kol /home/kol
[sudo] пароль для kol:
права доступа '/home/kol' изменены с 0777 (rwxrwxrwx) на 0755 (rwxr-xr-x)
владелец '/home/kol' оставлен как kol:kol

19 октября 2024, 05:52:17
Спасибо Лия!!! :D  Помогла!
Цитироватьkol@kol-VirtualBox:~/.ssh$ ssh 'kol@192.168.0.26'
Linux servdebian12 6.10.11+bpo-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.10.11-1~bpo12+1 (2024-10-03) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Oct 19 09:49:40 2024 from 192.168.0.17
kol@servdebian12:
Можешь словами сказать в чем была причина? что бы мне это запомнить...

19 октября 2024, 06:07:41
да! отключил и все работает...:
Цитировать#PasswordAuthentication yes
PasswordAuthentication no

sudo systemctl restart ssh 
Дело в правах к папке home.... ???