LINUX.ORG.RU
ФорумAdmin

сменил gui и при ssh - Permission denied (publickey).

 


0

1

перешол на xfce
при попытке подключения к любому серверу по ssh
выдаются ошибки типа
Permission denied (publickey).
или
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

выхожу в другой гуи типа МАТЕ там все норм.
Как так? Как исправить?


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

С ошибкой:
OpenSSH_8.2p1 Ubuntu-4ubuntu0.1, OpenSSL 1.1.1f 31 Mar 2020
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 101.101.101.101 [101.101.101.101] port 8100.
debug1: Connection established.
debug1: identity file /home/user/.ssh/id_rsa type -1
debug1: identity file /home/user/.ssh/id_rsa-cert type -1
debug1: identity file /home/user/.ssh/id_dsa type -1
debug1: identity file /home/user/.ssh/id_dsa-cert type -1
debug1: identity file /home/user/.ssh/id_ecdsa type -1
debug1: identity file /home/user/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/user/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/user/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/user/.ssh/id_ed25519 type -1
debug1: identity file /home/user/.ssh/id_ed25519-cert type -1
debug1: identity file /home/user/.ssh/id_ed25519_sk type -1
debug1: identity file /home/user/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/user/.ssh/id_xmss type -1
debug1: identity file /home/user/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.9p1 Debian-10+deb10u2
debug1: match: OpenSSH_7.9p1 Debian-10+deb10u2 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 101.101.101.101:8100 as 'pi'
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: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:pW8W48/K5wYh6QenyZMA6D0HzLSk0ykqZJ6czGaMqL4
debug1: Host '[101.101.101.101]:8100' is known and matches the ECDSA host key.
debug1: Found key in /home/user/.ssh/known_hosts:1
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: Will attempt key: /home/user/.ssh/id_rsa
debug1: Will attempt key: /home/user/.ssh/id_dsa
debug1: Will attempt key: /home/user/.ssh/id_ecdsa
debug1: Will attempt key: /home/user/.ssh/id_ecdsa_sk
debug1: Will attempt key: /home/user/.ssh/id_ed25519
debug1: Will attempt key: /home/user/.ssh/id_ed25519_sk
debug1: Will attempt key: /home/user/.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
debug1: Next authentication method: publickey
debug1: Trying private key: /home/user/.ssh/id_rsa
debug1: Trying private key: /home/user/.ssh/id_dsa
debug1: Trying private key: /home/user/.ssh/id_ecdsa
debug1: Trying private key: /home/user/.ssh/id_ecdsa_sk
debug1: Trying private key: /home/user/.ssh/id_ed25519
debug1: Trying private key: /home/user/.ssh/id_ed25519_sk
debug1: Trying private key: /home/user/.ssh/id_xmss
debug1: No more authentication methods to try.
pi@101.101.101.101: Permission denied (publickey).


Без ошибки
OpenSSH_8.2p1 Ubuntu-4ubuntu0.1, OpenSSL 1.1.1f 31 Mar 2020
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 101.101.101.101 [101.101.101.101] port 8100.
debug1: Connection established.
debug1: identity file /home/user/.ssh/id_rsa type -1
debug1: identity file /home/user/.ssh/id_rsa-cert type -1
debug1: identity file /home/user/.ssh/id_dsa type -1
debug1: identity file /home/user/.ssh/id_dsa-cert type -1
debug1: identity file /home/user/.ssh/id_ecdsa type -1
debug1: identity file /home/user/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/user/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/user/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/user/.ssh/id_ed25519 type -1
debug1: identity file /home/user/.ssh/id_ed25519-cert type -1
debug1: identity file /home/user/.ssh/id_ed25519_sk type -1
debug1: identity file /home/user/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/user/.ssh/id_xmss type -1
debug1: identity file /home/user/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.9p1 Debian-10+deb10u2
debug1: match: OpenSSH_7.9p1 Debian-10+deb10u2 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 101.101.101.101:8100 as 'pi'
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: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:pW8W48/K5wYh6QenyZMA6D0HzLSk0ykqZJ6czGaMqL4
debug1: Host '[101.101.101.101]:8100' is known and matches the ECDSA host key.
debug1: Found key in /home/user/.ssh/known_hosts:1
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: Will attempt key: user@pc RSA SHA256:3R6ajgCwpIFIX9++h+eaC225A/Z34Pol11hLNswQMkc agent
debug1: Will attempt key: user@pc RSA SHA256:g8tvVxPeB9Bu2aFgdK3mM4qlk1HqQcH0mQLgIy2nT6Y agent
debug1: Will attempt key: user@pc RSA SHA256:DwHrHioa+gCER/iOlrNnos29pK7t3pJ/JC821TDmGes agent
debug1: Will attempt key: user@nb RSA SHA256:i5y/PLygcKbQShsNQUoweM8sPn/Fp/q6MnOVZeVAMmQ agent
debug1: Will attempt key: /home/user/.ssh/id_rsa
debug1: Will attempt key: /home/user/.ssh/id_dsa
debug1: Will attempt key: /home/user/.ssh/id_ecdsa
debug1: Will attempt key: /home/user/.ssh/id_ecdsa_sk
debug1: Will attempt key: /home/user/.ssh/id_ed25519
debug1: Will attempt key: /home/user/.ssh/id_ed25519_sk
debug1: Will attempt key: /home/user/.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
debug1: Next authentication method: publickey
debug1: Offering public key: user@pc RSA SHA256:3R6ajgCwpIFIX9++h+eaC225A/Z34Pol91hLNswQMkc agent
debug1: Server accepts key: user@pc RSA SHA256:3R6ajgCwpIFIX9++h+eaC225A/Z34Pol91hLNswQMkc agent
debug1: Authentication succeeded (publickey).
Authenticated to 101.101.101.101 ([101.101.101.101]:8100).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: Remote: /home/pi/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: Remote: /home/pi/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: Sending environment.
debug1: Sending env LANG = ru_RU.UTF-8
Last login: Fri Oct 30 01:55:42 2020 from 133.123.0.221


авторизация везде по ключам пароли отключены

Regacar ()
Последнее исправление: Regacar (всего исправлений: 1 )
Ответ на: комментарий от Regacar

Рекомендую пользоваться разметкой, очень неудобно такие портянки читать.

Чёт у тебя столько ключей что я не могу распарсить, второй раз была попытка с тем же ключом?

kardapoltsev ★★★★ ()

Похоже что ssh-agent в mate включается автоматически и работает, а в xfce нет

Посмотрите список процессов в обох окружения - ps axu | grep ssh-agent

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

user 1268 0.0 0.0 6032 456 ? Ss 16:25 0:00 /usr/bin/ssh-agent /usr/bin/im-launch startxfce4
user 6575 0.0 0.0 9036 728 pts/1 S+ 18:14 0:00 grep --color=auto ssh-agent

Regacar ()
Ответ на: комментарий от Bootmen

И останься вообще без приватных ключей, которые туда по-дефолту кладутся при создании?

Ништяк совет.

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

Пардон. Лучше переместить пока. Я так понимаю- если конект по паролю то клиент должен получить новый ключ.

Bootmen ☆☆☆ ()
Ответ на: комментарий от Bootmen

помогла комманда ssh-add
но до перезапуска. заставить через автозагрузку ее работать не получилось.
Методом тыка проблема решилась поставив галочку в
Сеансы и запуск->Дополнительные->Запускать службы GNOME
о_О

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

Методом тыка проблема решилась поставив галочку в Сеансы и запуск->Дополнительные->Запускать службы GNOME

Вангую, нужен GNOME Keyring, раз такое хочет. Только зачем OpenSSH Keyring?

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