From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00, DNS_FROM_AHBL_RHSBL, FSL_HELO_BARE_IP_2, RCVD_IN_DNSWL_LOW, RCVD_NUMERIC_HELO, RP_MATCHES_RCVD, SPF_HELO_PASS,SPF_PASS,T_HEADER_FROM_DIFFERENT_DOMAINS autolearn=no autolearn_force=no version=3.4.0 X-Injected-Via-Gmane: http://gmane.org/ To: community@lists.altlinux.org From: "Alexei V. Mezin" Date: Thu, 11 Feb 2016 00:23:50 +0300 Message-ID: References: <56BAE25D.9050409@mann-schroeder.ru> <20160210135256.GG26587@glebfm.cloud.tilaa.com> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 188.244.39.85 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 In-Reply-To: <20160210135256.GG26587@glebfm.cloud.tilaa.com> Subject: Re: [Comm] =?utf-8?b?c3NoINC4INC/0YDQvtCx0LvQtdC80LAg0LLRhdC+0LTQsCA=?= =?utf-8?b?0L/QviDQutC70Y7Rh9GDLg==?= X-BeenThere: community@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Community general discussions List-Id: ALT Linux Community general discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2016 21:24:02 -0000 Archived-At: List-Archive: List-Post: 10.02.2016 16:52, Gleb Fotengauer-Malinovskiy пишет: > echo $SSH_AUTH_SOCK $SSH_AGENT_PID > Вот как все это выглядит у меня: перезагрузка, КДЕ, kdm автологин. [alexei@bigbear ~]$ echo $SSH_AUTH_SOCK $SSH_AGENT_PID /home/alexei/.ssh/agent 963 Попытка входа на сервер неудачная. Повторные попытки аналогично, спрашивает пароль. [alexei@bigbear ~]$ ssh -p 2022 server alexei@server's password: Попытка на всякий случай запустить ssh-agent: [alexei@bigbear ~]$ ssh-agent SSH_AUTH_SOCK=/tmp/.private/alexei/ssh-t89RTWJq5ToW/agent.1887; export SSH_AUTH_SOCK; SSH_AGENT_PID=1888; export SSH_AGENT_PID; echo Agent pid 1888; [alexei@bigbear ~]$ echo $SSH_AUTH_SOCK $SSH_AGENT_PID /home/alexei/.ssh/agent 963 [alexei@bigbear ~]$ ssh -p 2022 server alexei@server's password: То есть снова не пускает. А вот как это выглядит в verbose: [alexei@bigbear ~]$ ssh -v -p 2022 server OpenSSH_7.1p1, OpenSSL 1.0.2f 28 Jan 2016 debug1: Reading configuration data /etc/openssh/ssh_config debug1: /etc/openssh/ssh_config line 20: Applying options for * debug1: Connecting to server [192.168.0.254] port 2022. debug1: Connection established. debug1: identity file /home/alexei/.ssh/id_rsa type 1 debug1: key_load_public: No such file or directory debug1: identity file /home/alexei/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/alexei/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/alexei/.ssh/id_dsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/alexei/.ssh/id_ecdsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/alexei/.ssh/id_ecdsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/alexei/.ssh/id_ed25519 type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/alexei/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.1 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9 debug1: match: OpenSSH_5.9 pat OpenSSH_5* compat 0x0c000000 debug1: Authenticating to server:2022 as 'alexei' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes256-ctr umac-64@openssh.com none debug1: kex: client->server aes256-ctr umac-64@openssh.com none debug1: sending SSH2_MSG_KEX_ECDH_INIT debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ecdsa-sha2-nistp256 SHA256:MmzJkQBXZJRXVKoeX6se1zGstPYeSEQGzl3bn5j4Sow debug1: Host '[server]:2022' is known and matches the ECDSA host key. debug1: Found key in /home/alexei/.ssh/known_hosts:3 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Offering RSA public key: /home/alexei/.ssh/id_rsa debug1: Server accepts key: pkalg ssh-rsa blen 279 debug1: Trying private key: /home/alexei/.ssh/id_dsa debug1: Trying private key: /home/alexei/.ssh/id_ecdsa debug1: Trying private key: /home/alexei/.ssh/id_ed25519 debug1: Next authentication method: password alexei@server's password: То есть ключ находится. сервер его принимает, но клиент продолжает и запрашивает пароль. Однако! Запускаем ssh-add и все проходит: [alexei@bigbear ~]$ ssh-add Identity added: /home/alexei/.ssh/id_rsa (/home/alexei/.ssh/id_rsa) [alexei@bigbear ~]$ ssh -p 2022 server Last login: Thu Feb 11 00:00:27 2016 from 192.168.0.244 Вот как это выглядит на этот раз: [alexei@bigbear ~]$ ssh -v -p 2022 server OpenSSH_7.1p1, OpenSSL 1.0.2f 28 Jan 2016 debug1: Reading configuration data /etc/openssh/ssh_config debug1: /etc/openssh/ssh_config line 20: Applying options for * debug1: Connecting to server [192.168.0.254] port 2022. debug1: Connection established. debug1: identity file /home/alexei/.ssh/id_rsa type 1 debug1: key_load_public: No such file or directory debug1: identity file /home/alexei/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/alexei/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/alexei/.ssh/id_dsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/alexei/.ssh/id_ecdsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/alexei/.ssh/id_ecdsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/alexei/.ssh/id_ed25519 type -1 debug1: key_load_public: No such file or directory debug1: identity file /home/alexei/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.1 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9 debug1: match: OpenSSH_5.9 pat OpenSSH_5* compat 0x0c000000 debug1: Authenticating to server:2022 as 'alexei' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes256-ctr umac-64@openssh.com none debug1: kex: client->server aes256-ctr umac-64@openssh.com none debug1: sending SSH2_MSG_KEX_ECDH_INIT debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ecdsa-sha2-nistp256 SHA256:MmzJkQBXZJRXVKoeX6se1zGstPYeSEQGzl3bn5j4Sow debug1: Host '[server]:2022' is known and matches the ECDSA host key. debug1: Found key in /home/alexei/.ssh/known_hosts:3 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Offering RSA public key: /home/alexei/.ssh/id_rsa debug1: Server accepts key: pkalg ssh-rsa blen 279 debug1: Authentication succeeded (publickey). Authenticated to server ([192.168.0.254]:2022). debug1: channel 0: new [client-session] debug1: Requesting no-more-sessions@openssh.com debug1: Entering interactive session. debug1: Sending environment. debug1: Sending env LANG = ru_RU.UTF-8 debug1: Sending env LANGUAGE = Last login: Thu Feb 11 00:05:21 2016 from 192.168.0.244 Все то же самое, сервер принимает ключ, и клиент считает, что этого достаточно.