2015-02-06 64 views
0
  • 主机(Linux)的

[Web服务器]ANSIBLE SSH配置

FGR-lgchefwk201 ansible_ssh_host = 10.7.35.68

  1. 当我尝试此=> [OK]

ansible Web服务器-m平-c的paramiko -k

fgr-lgchefwk201 | success >> { 
"changed": false, 
"ping": "pong" 
} 
  • 当我尝试此=> [ISSUE]
  • ansible网络服务器-m平

    日志:

    2015-02-08 23:54:45,474 p=1553 u=root | /usr/bin/ansible webservers -m ping -vvvv 
    2015-02-08 23:54:45,475 p=1553 u=root | 
    2015-02-08 23:54:45,539 p=1553 u=root | <10.7.35.68> ESTABLISH CONNECTION FOR USER: root 
    2015-02-08 23:54:45,544 p=1553 u=root | <10.7.35.68> REMOTE_MODULE ping 
    2015-02-08 23:54:45,570 p=1553 u=root | <10.7.35.68> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/root/.ansible/cp/ansible-ssh-%h-%p-%r" -o Port=22 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 10.7.35.68 /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1423468485.57-221982977298326 && echo $HOME/.ansible/tmp/ansible-tmp-1423468485.57-221982977298326' 
    2015-02-08 23:54:46,867 p=1553 u=root | fgr-lgchefwk201 | FAILED => SSH encountered an unknown error. The output was: 
    OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013 
    debug1: Reading configuration data /root/.ssh/config^M 
    debug1: Reading configuration data /etc/ssh/ssh_config^M 
    debug1: Applying options for *^M 
    debug1: auto-mux: Trying existing master^M 
    debug1: Control socket "/root/.ansible/cp/ansible-ssh-10.7.35.68-22-root" does not exist^M 
    debug2: ssh_connect: needpriv 0^M 
    debug1: Connecting to 10.7.35.68 [10.7.35.68] port 22.^M 
    debug2: fd 3 setting O_NONBLOCK^M 
    debug1: fd 3 clearing O_NONBLOCK^M 
    debug1: Connection established.^M 
    debug3: timeout: 10000 ms remain after connect^M 
    debug1: permanently_set_uid: 0/0^M 
    debug3: Not a RSA1 key file /root/.ssh/kdump_id_rsa.^M 
    debug2: key_type_from_name: unknown key type '-----BEGIN'^M 
    debug3: key_read: missing keytype^M 
    debug3: key_read: missing whitespace^M 
    debug3: key_read: missing whitespace^M 
    debug3: key_read: missing whitespace^M 
    debug3: key_read: missing whitespace^M 
    debug3: key_read: missing whitespace^M 
    debug3: key_read: missing whitespace^M 
    debug3: key_read: missing whitespace^M 
    debug3: key_read: missing whitespace^M 
    debug3: key_read: missing whitespace^M 
    debug3: key_read: missing whitespace^M 
    debug3: key_read: missing whitespace^M 
    debug3: key_read: missing whitespace^M 
    debug2: key_type_from_name: unknown key type '-----END'^M 
    debug3: key_read: missing keytype^M 
    debug1: identity file /root/.ssh/kdump_id_rsa type 1^M 
    debug1: identity file /root/.ssh/kdump_id_rsa-cert type -1^M 
    debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3^M 
    debug1: match: OpenSSH_5.3 pat OpenSSH*^M 
    debug1: Enabling compatibility mode for protocol 2.0^M 
    debug1: Local version string SSH-2.0-OpenSSH_5.3^M 
    debug2: fd 3 setting O_NONBLOCK^M 
    debug1: SSH2_MSG_KEXINIT sent^M 
    debug3: Wrote 960 bytes for a total of 981^M 
    debug1: SSH2_MSG_KEXINIT received^M 
    debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],ssh-rsa,ssh-dss^M 
    debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]^M 
    debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]^M 
    debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96^M 
    debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96^M 
    debug2: kex_parse_kexinit: [email protected],zlib,none^M 
    debug2: kex_parse_kexinit: [email protected],zlib,none^M 
    debug2: kex_parse_kexinit: ^M 
    debug2: kex_parse_kexinit: ^M 
    debug2: kex_parse_kexinit: first_kex_follows 0 ^M 
    debug2: kex_parse_kexinit: reserved 0 ^M 
    debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1^M 
    debug2: kex_parse_kexinit: ssh-rsa,ssh-dss^M 
    debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]^M 
    debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]^M 
    debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96^M 
    debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96^M 
    debug2: kex_parse_kexinit: none,[email protected]^M 
    debug2: kex_parse_kexinit: none,[email protected]^M 
    debug2: kex_parse_kexinit: ^M 
    debug2: kex_parse_kexinit: ^M 
    debug2: kex_parse_kexinit: first_kex_follows 0 ^M 
    debug2: kex_parse_kexinit: reserved 0 ^M 
    debug2: mac_setup: found hmac-md5^M 
    debug1: kex: server->client aes128-ctr hmac-md5 [email protected]^M 
    debug2: mac_setup: found hmac-md5^M 
    debug1: kex: client->server aes128-ctr hmac-md5 [email protected]^M 
    debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent^M 
    debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP^M 
    debug3: Wrote 24 bytes for a total of 1005^M 
    debug2: dh_gen_key: priv key bits set: 132/256^M 
    debug2: bits set: 540/1024^M 
    debug1: SSH2_MSG_KEX_DH_GEX_INIT sent^M 
    debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY^M 
    debug3: Wrote 144 bytes for a total of 1149^M 
    debug3: check_host_in_hostfile: host 10.7.35.68 filename /root/.ssh/known_hosts^M 
    debug3: check_host_in_hostfile: host 10.7.35.68 filename /root/.ssh/known_hosts^M 
    debug3: check_host_in_hostfile: match line 4^M 
    debug1: Host '10.7.35.68' is known and matches the RSA host key.^M 
    debug1: Found key in /root/.ssh/known_hosts:4^M 
    debug2: bits set: 496/1024^M 
    debug1: ssh_rsa_verify: signature correct^M 
    debug2: kex_derive_keys^M 
    debug2: set_newkeys: mode 1^M 
    debug1: SSH2_MSG_NEWKEYS sent^M 
    debug1: expecting SSH2_MSG_NEWKEYS^M 
    debug3: Wrote 16 bytes for a total of 1165^M 
    debug2: set_newkeys: mode 0^M 
    debug1: SSH2_MSG_NEWKEYS received^M 
    debug1: SSH2_MSG_SERVICE_REQUEST sent^M 
    debug3: Wrote 48 bytes for a total of 1213^M 
    debug2: service_accept: ssh-userauth^M 
    debug1: SSH2_MSG_SERVICE_ACCEPT received^M 
    debug2: key: /root/.ssh/kdump_id_rsa (0x7fcd45127da0)^M 
    debug3: Wrote 64 bytes for a total of 1277^M 
    debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password^M 
    debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password^M 
    debug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey^M 
    debug3: authmethod_lookup gssapi-with-mic^M 
    debug3: remaining preferred: gssapi-keyex,hostbased,publickey^M 
    debug3: authmethod_is_enabled gssapi-with-mic^M 
    debug1: Next authentication method: gssapi-with-mic^M 
    debug3: Trying to reverse map address 10.7.35.68.^M 
    debug1: Unspecified GSS failure. Minor code may provide more information 
    Credentials cache file '/tmp/krb5cc_0' not found 
    ^M 
    debug1: Unspecified GSS failure. Minor code may provide more information 
    Credentials cache file '/tmp/krb5cc_0' not found 
    ^M 
    debug1: Unspecified GSS failure. Minor code may provide more information 
    
    ^M 
    debug1: Unspecified GSS failure. Minor code may provide more information 
    Credentials cache file '/tmp/krb5cc_0' not found 
    ^M 
    debug2: we did not send a packet, disable method^M 
    debug3: authmethod_lookup gssapi-keyex^M 
    debug3: remaining preferred: hostbased,publickey^M 
    debug3: authmethod_is_enabled gssapi-keyex^M 
    debug1: Next authentication method: gssapi-keyex^M 
    debug1: No valid Key exchange context^M 
    debug2: we did not send a packet, disable method^M 
    debug3: authmethod_lookup publickey^M 
    debug3: remaining preferred: ,publickey^M 
    debug3: authmethod_is_enabled publickey^M 
    debug1: Next authentication method: publickey^M 
    debug1: Offering public key: /root/.ssh/kdump_id_rsa^M 
    debug3: send_pubkey_test^M 
    debug2: we sent a publickey packet, wait for reply^M 
    debug3: Wrote 368 bytes for a total of 1645^M 
    debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password^M 
    debug2: we did not send a packet, disable method^M 
    debug1: No more authentication methods to try.^M 
    Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).^M 
    

    问题: 它与“不是RSA1密钥文件/root/.ssh/kdump_id_rsa”有关。 ?

    +0

    你跟着[windows安装指南(http://docs.ansible.com/intro_windows.html)? – tedder42 2015-02-06 19:12:46

    +0

    对不起,我做了改变。这是Linux(节点)问题的Linux(控制机器)。 – yos 2015-02-09 08:05:50

    +0

    是的,它是相关的 - 你的密钥已损坏。 [看到这个](http://serverfault.com/questions/613655/ssh-key-problems-not-a-rsa1-key-file-unknown-key-type-begin)。 – tedder42 2015-02-09 17:14:50

    回答

    0

    SELinux可能会受到阻碍。本文讨论了我类似的问题,部分

    https://systembash.com/ssh-unspecified-gss-failure/

    +1

    请考虑引用文章的相关部分,所以你的答案实际上成为这个网站的一部分。 – user700390 2015-04-02 19:14:43

    +0

    嗨,链接似乎走不通:S – yos 2015-04-07 07:09:27

    +0

    链接似乎工作,再次? – 2016-03-27 20:45:15