LINUX.ORG.RU
ФорумAdmin

Trying private key: /var/lib/one/.ssh/id_xmss

 , ,


0

1

Всем привет.

Домашняя директория юзера oneadmin /var/lib/one там же папка .ssh

[oneadmin@on-test ~]$ ll .ssh
total 40
-rw------- 1 oneadmin oneadmin 1444 Apr 16 00:12 config
-rw------- 1 oneadmin oneadmin 1381 Apr 30 14:32 id_dsa
-rw-r--r-- 1 oneadmin oneadmin  606 Apr 30 14:32 id_dsa.pub
-rw------- 1 oneadmin oneadmin  513 Apr 30 14:33 id_ecdsa
-rw-r--r-- 1 oneadmin oneadmin  178 Apr 30 14:33 id_ecdsa.pub
-rw------- 1 oneadmin oneadmin  411 Apr 30 14:34 id_ed25519
-rw-r--r-- 1 oneadmin oneadmin   98 Apr 30 14:34 id_ed25519.pub
-rw------- 1 oneadmin oneadmin 2602 Apr 16 00:12 id_rsa
-rw-r--r-- 1 oneadmin oneadmin  570 Apr 16 00:12 id_rsa.pub
-rw-rw-r-- 1 oneadmin oneadmin 1680 Apr 30 14:35 known_hosts

Задача: беспарольная авторизация между двумя хостами. 192.168.10.171 - локальный хост 192.168.10.169 - удаленный хост

Делаю:

ssh-keyscan 192.168.10.171 >> /var/lib/one/.ssh/known_hosts
ssh-keyscan 192.168.10.169 >> /var/lib/one/.ssh/known_hosts

Затем: scp -rp /var/lib/one/.ssh root@192.168.10.169:/var/lib/one/

Пробую ssh -v 192.168.10.169

[oneadmin@on-test ~]$ ssh -v 192.168.10.169
OpenSSH_8.0p1, OpenSSL 1.1.1g FIPS  21 Apr 2020
debug1: Reading configuration data /var/lib/one/.ssh/config
debug1: /var/lib/one/.ssh/config line 9: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 52: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: Control socket "/run/one/ssh-socks/ctl-M-2e6918e5b83c1898e28a015b55252c7cfd315a7a.sock" does not exist
debug1: Connecting to 192.168.10.169 [192.168.10.169] port 22.
debug1: Connection established.
debug1: identity file /var/lib/one/.ssh/id_rsa type 0
debug1: identity file /var/lib/one/.ssh/id_rsa-cert type -1
debug1: identity file /var/lib/one/.ssh/id_dsa type 1
debug1: identity file /var/lib/one/.ssh/id_dsa-cert type -1
debug1: identity file /var/lib/one/.ssh/id_ecdsa type 2
debug1: identity file /var/lib/one/.ssh/id_ecdsa-cert type -1
debug1: identity file /var/lib/one/.ssh/id_ed25519 type 3
debug1: identity file /var/lib/one/.ssh/id_ed25519-cert type -1
debug1: identity file /var/lib/one/.ssh/id_xmss type -1
debug1: identity file /var/lib/one/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.0
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.0
debug1: match: OpenSSH_8.0 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.10.169:22 as 'oneadmin'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
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: kex: curve25519-sha256 need=64 dh_need=64
debug1: kex: curve25519-sha256 need=64 dh_need=64
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:8EEixRjQbwhjriFUpJwj8AjZ7Ps+EP6pjlGIAOosQvs
debug1: Host '192.168.10.169' is known and matches the ECDSA host key.
debug1: Found key in /var/lib/one/.ssh/known_hosts:2
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: Skipping ssh-dss key /var/lib/one/.ssh/id_dsa - not in PubkeyAcceptedKeyTypes
debug1: Will attempt key: /var/lib/one/.ssh/id_rsa RSA SHA256:VIVCNHZ8QmZTHhwB8LZtoObaRqpFakDbVYOX1Lk8pxQ
debug1: Will attempt key: /var/lib/one/.ssh/id_ecdsa ECDSA SHA256:rUb3Ra9GI4dQXB4CCYQA6kBlpLhbmQezTYkcYTCk9zk
debug1: Will attempt key: /var/lib/one/.ssh/id_ed25519 ED25519 SHA256:/HPv+7aZRrZ5hoW2GP9gMBMg/bqhtbukqcP7ObZ9WAw
debug1: Will attempt key: /var/lib/one/.ssh/id_xmss
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Offering public key: /var/lib/one/.ssh/id_rsa RSA SHA256:VIVCNHZ8QmZTHhwB8LZtoObaRqpFakDbVYOX1Lk8pxQ
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Offering public key: /var/lib/one/.ssh/id_ecdsa ECDSA SHA256:rUb3Ra9GI4dQXB4CCYQA6kBlpLhbmQezTYkcYTCk9zk
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Offering public key: /var/lib/one/.ssh/id_ed25519 ED25519 SHA256:/HPv+7aZRrZ5hoW2GP9gMBMg/bqhtbukqcP7ObZ9WAw
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Trying private key: /var/lib/one/.ssh/id_xmss
debug1: Next authentication method: password
oneadmin@192.168.10.169's password:

Не могу понять, что ему не хватает



Последнее исправление: yatakoi (всего исправлений: 2)

Ответ на: комментарий от Radjah

Нет.

Там тупо все тоже самое

[root@kvm-vgpu-node .ssh]# ll
total 40
-rw-------. 1 oneadmin oneadmin 1444 Apr 15 17:12 config
-rw-------. 1 root     root     1381 Apr 30 07:32 id_dsa
-rw-r--r--. 1 root     root      606 Apr 30 07:32 id_dsa.pub
-rw-------. 1 root     root      513 Apr 30 07:33 id_ecdsa
-rw-r--r--. 1 root     root      178 Apr 30 07:33 id_ecdsa.pub
-rw-------. 1 root     root      411 Apr 30 07:34 id_ed25519
-rw-r--r--. 1 root     root       98 Apr 30 07:34 id_ed25519.pub
-rw-------. 1 oneadmin oneadmin 2602 Apr 15 17:12 id_rsa
-rw-r--r--. 1 oneadmin oneadmin  570 Apr 15 17:12 id_rsa.pub
-rw-rw-r--. 1 oneadmin oneadmin 1680 Apr 30 07:35 known_hosts

Делал по этой статье именно в плане SSH https://www.alibabacloud.com/blog/how-to-install-and-configure-opennebula-on-ubuntu-18-04_595917

yatakoi
() автор топика
Ответ на: комментарий от yatakoi

Используй ssh-copy-id для копирования ключей.

Radjah ★★★★★
()
Ответ на: комментарий от yatakoi

Не делай по той статье, её писал аутист.

Тебе нужно вот это (о чем написано в статье, но не дано как это сделать). Читай ман или менее аутичные howto где есть ssh-copy-id.

You can do this by distributing the public key of the user oneadmin from both machines to the file /var/lib/one/.ssh/authorized_keys.

anonymous
()
Ответ на: комментарий от yatakoi

да, тебе сказали дважды, повторю третий раз: используй ssh-copy-id

trashymichael ★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.