Sorry ... there was a typo in my mail, I ment: AuthenticationMethods keyboard-interactive:skey,password (without space between "skey,password")
---- If I use: AuthenticationMethods publickey,password I have to use the both, the key and I'm asked for the password after successful key authentication. So that works fine. Now trying: AuthenticationMethods keyboard-interactive:skey, password It doesn't work ... I must have forgotten something. Here is the output of sshd: $ sudo /usr/sbin/sshd -d -d -d -f /etc/ssh/sshd_config.skey debug2: load_server_config: filename /etc/ssh/sshd_config.skey debug2: load_server_config: done config len = 324 debug2: parse_server_config: config /etc/ssh/sshd_config.skey len 324 debug3: /etc/ssh/sshd_config.skey:12 setting Port 8022 debug3: /etc/ssh/sshd_config.skey:40 setting PermitRootLogin no debug3: /etc/ssh/sshd_config.skey:50 setting AuthorizedKeysFile .ssh/authorized_keys debug3: /etc/ssh/sshd_config.skey:70 setting AuthenticationMethods keyboard-interactive:skey,password debug3: /etc/ssh/sshd_config.skey:95 setting UsePrivilegeSeparation sandbox debug3: /etc/ssh/sshd_config.skey:101 setting UseDNS no debug3: /etc/ssh/sshd_config.skey:112 setting Subsystem sftp /usr/libexec/sftp-server debug1: sshd version OpenSSH_6.3, OpenSSL 1.0.1c 10 May 2012 debug3: Incorrect RSA1 identifier debug1: read PEM private key done: type RSA debug3: Incorrect RSA1 identifier debug3: Could not load "/etc/ssh/ssh_host_rsa_key" as a RSA1 public key debug1: private host key: #0 type 1 RSA debug3: Incorrect RSA1 identifier debug1: read PEM private key done: type DSA debug3: Incorrect RSA1 identifier debug3: Could not load "/etc/ssh/ssh_host_dsa_key" as a RSA1 public key debug1: private host key: #1 type 2 DSA debug3: Incorrect RSA1 identifier debug1: read PEM private key done: type ECDSA debug3: Incorrect RSA1 identifier debug3: Could not load "/etc/ssh/ssh_host_ecdsa_key" as a RSA1 public key debug1: private host key: #2 type 3 ECDSA debug1: rexec_argv[0]='/usr/sbin/sshd' debug1: rexec_argv[1]='-d' debug1: rexec_argv[2]='-d' debug1: rexec_argv[3]='-d' debug1: rexec_argv[4]='-f' debug1: rexec_argv[5]='/etc/ssh/sshd_config.skey' debug2: fd 3 setting O_NONBLOCK debug1: Bind to port 8022 on 0.0.0.0. Server listening on 0.0.0.0 port 8022. debug2: fd 4 setting O_NONBLOCK debug1: Bind to port 8022 on ::. Server listening on :: port 8022. debug1: fd 5 clearing O_NONBLOCK debug1: Server will not fork when running in debugging mode. debug3: send_rexec_state: entering fd = 8 config len 324 debug3: ssh_msg_send: type 0 debug3: send_rexec_state: done debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8 debug1: inetd sockets after dupping: 3, 3 Connection from 10.0.0.9 port 58822 debug1: Client protocol version 2.0; client software version PuTTY_Release_0.62 debug1: no match: PuTTY_Release_0.62 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.3 debug2: fd 3 setting O_NONBLOCK debug3: ssh_sandbox_init: preparing systrace sandbox debug2: Network child is on pid 17082 debug3: ssh_sandbox_parent: wait for child 17082 debug3: ssh_sandbox_parent: child 17082 stopped debug3: ssh_sandbox_parent: systrace attach, fd=9 debug3: ssh_sandbox_parent: policy: enable syscall 1 debug3: ssh_sandbox_parent: policy: enable syscall 3 debug3: ssh_sandbox_parent: policy: enable syscall 4 debug3: ssh_sandbox_parent: policy: enable syscall 5 debug3: ssh_sandbox_parent: policy: enable syscall 6 debug3: ssh_sandbox_parent: policy: enable syscall 20 debug3: ssh_sandbox_parent: policy: enable syscall 48 debug3: ssh_sandbox_parent: policy: enable syscall 67 debug3: ssh_sandbox_parent: policy: enable syscall 71 debug3: ssh_sandbox_parent: policy: enable syscall 73 debug3: ssh_sandbox_parent: policy: enable syscall 74 debug3: ssh_sandbox_parent: policy: enable syscall 75 debug3: ssh_sandbox_parent: policy: enable syscall 87 debug3: ssh_sandbox_parent: policy: enable syscall 197 debug3: ssh_sandbox_parent: policy: enable syscall 202 debug3: ssh_sandbox_parent: policy: enable syscall 252 debug3: ssh_sandbox_parent: policy: enable syscall 286 debug3: ssh_sandbox_parent: start child 17082 debug3: preauth child monitor started debug3: privsep user:group 27:27 [preauth] debug1: permanently_set_uid: 27/27 [preauth] debug3: ssh_sandbox_child: ready [preauth] debug3: ssh_sandbox_child: started [preauth] debug1: list_hostkey_types: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256 [preauth] debug1: SSH2_MSG_KEXINIT sent [preauth] debug1: SSH2_MSG_KEXINIT received [preauth] debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1 -sha1 [preauth] debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256 [preauth] debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-...@openssh.com,aes256-...@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,ri jndael-...@lysator.liu.se [preauth] debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-...@openssh.com,aes256-...@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,ri jndael-...@lysator.liu.se [preauth] debug2: kex_parse_kexinit: hmac-md5-...@openssh.com,hmac-sha1-...@openssh.com,umac-64-...@openssh.com,umac-128-...@openssh.com,hmac-sha2-256-...@openssh.com,hmac-sha2-512-...@openssh.com,hmac-ripemd160-etm @openssh.com,hmac-sha1-96-...@openssh.com,hmac-md5-96-...@openssh.com,hmac-md5,hmac-sha1,umac...@openssh.com,umac-...@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd...@openssh.com,hmac- sha1-96,hmac-md5-96 [preauth] debug2: kex_parse_kexinit: hmac-md5-...@openssh.com,hmac-sha1-...@openssh.com,umac-64-...@openssh.com,umac-128-...@openssh.com,hmac-sha2-256-...@openssh.com,hmac-sha2-512-...@openssh.com,hmac-ripemd160-etm @openssh.com,hmac-sha1-96-...@openssh.com,hmac-md5-96-...@openssh.com,hmac-md5,hmac-sha1,umac...@openssh.com,umac-...@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd...@openssh.com,hmac- sha1-96,hmac-md5-96 [preauth] debug2: kex_parse_kexinit: none,z...@openssh.com [preauth] debug2: kex_parse_kexinit: none,z...@openssh.com [preauth] debug2: kex_parse_kexinit: [preauth] debug2: kex_parse_kexinit: [preauth] debug2: kex_parse_kexinit: first_kex_follows 0 [preauth] debug2: kex_parse_kexinit: reserved 0 [preauth] debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,rsa2048-sha256,rsa1024-sha1 [preauth] debug2: kex_parse_kexinit: ssh-rsa,ssh-dss [preauth] debug2: kex_parse_kexinit: aes256-ctr,aes256-cbc,rijndael-...@lysator.liu.se,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,blowfish-ctr,blowfish-cbc,3des-ctr,3des-cbc,arcfour256,arcfour128 [preauth] debug2: kex_parse_kexinit: aes256-ctr,aes256-cbc,rijndael-...@lysator.liu.se,aes192-ctr,aes192-cbc,aes128-ctr,aes128-cbc,blowfish-ctr,blowfish-cbc,3des-ctr,3des-cbc,arcfour256,arcfour128 [preauth] debug2: kex_parse_kexinit: hmac-sha1,hmac-sha1-96,hmac-md5 [preauth] debug2: kex_parse_kexinit: hmac-sha1,hmac-sha1-96,hmac-md5 [preauth] debug2: kex_parse_kexinit: none,zlib [preauth] debug2: kex_parse_kexinit: none,zlib [preauth] debug2: kex_parse_kexinit: [preauth] debug2: kex_parse_kexinit: [preauth] debug2: kex_parse_kexinit: first_kex_follows 0 [preauth] debug2: kex_parse_kexinit: reserved 0 [preauth] debug2: mac_setup: found hmac-sha1 [preauth] debug1: kex: client->server aes256-ctr hmac-sha1 none [preauth] debug2: mac_setup: found hmac-sha1 [preauth] debug1: kex: server->client aes256-ctr hmac-sha1 none [preauth] debug1: SSH2_MSG_KEX_DH_GEX_REQUEST_OLD received [preauth] debug3: mm_request_send entering: type 0 [preauth] debug3: mm_choose_dh: waiting for MONITOR_ANS_MODULI [preauth] debug3: mm_request_receive_expect entering: type 1 [preauth] debug3: mm_request_receive entering [preauth] debug3: mm_request_receive entering debug3: monitor_read: checking request 0 debug3: mm_answer_moduli: got parameters: 1024 4096 8192 debug3: mm_request_send entering: type 1 debug2: monitor_read: 0 used once, disabling now debug3: mm_choose_dh: remaining 0 [preauth] debug1: SSH2_MSG_KEX_DH_GEX_GROUP sent [preauth] debug2: dh_gen_key: priv key bits set: 266/512 [preauth] debug2: bits set: 1986/4096 [preauth] debug1: expecting SSH2_MSG_KEX_DH_GEX_INIT [preauth] debug2: bits set: 2008/4096 [preauth] debug3: mm_key_sign entering [preauth] debug3: mm_request_send entering: type 6 [preauth] debug3: mm_key_sign: waiting for MONITOR_ANS_SIGN [preauth] debug3: mm_request_receive_expect entering: type 7 [preauth] debug3: mm_request_receive entering [preauth] debug3: mm_request_receive entering debug3: monitor_read: checking request 6 debug3: mm_answer_sign debug3: mm_answer_sign: signature 0x1b37b2cd0000(271) debug3: mm_request_send entering: type 7 debug2: monitor_read: 6 used once, disabling now debug1: SSH2_MSG_KEX_DH_GEX_REPLY sent [preauth] debug2: kex_derive_keys [preauth] debug2: set_newkeys: mode 1 [preauth] debug1: SSH2_MSG_NEWKEYS sent [preauth] debug1: expecting SSH2_MSG_NEWKEYS [preauth] debug2: set_newkeys: mode 0 [preauth] debug1: SSH2_MSG_NEWKEYS received [preauth] debug1: KEX done [preauth] debug1: userauth-request for user didier:skey service ssh-connection method none [preauth] debug1: attempt 0 failures 0 [preauth] debug3: mm_getpwnamallow entering [preauth] debug3: mm_request_send entering: type 8 [preauth] debug3: mm_getpwnamallow: waiting for MONITOR_ANS_PWNAM [preauth] debug3: mm_request_receive_expect entering: type 9 [preauth] debug3: mm_request_receive entering [preauth] debug3: mm_request_receive entering debug3: monitor_read: checking request 8 debug3: mm_answer_pwnamallow debug2: parse_server_config: config reprocess config len 324 debug3: auth2_setup_methods_lists: checking methods debug1: authentication methods list 0: keyboard-interactive:skey,password debug3: mm_answer_pwnamallow: sending MONITOR_ANS_PWNAM: 1 debug3: mm_request_send entering: type 9 debug2: monitor_read: 8 used once, disabling now debug2: input_userauth_request: setting up authctxt for didier [preauth] debug3: mm_inform_authserv entering [preauth] debug3: mm_request_send entering: type 4 [preauth] debug3: auth2_setup_methods_lists: checking methods [preauth] debug1: authentication methods list 0: keyboard-interactive:skey,password [preauth] debug2: Unrecognized authentication method name: none [preauth] debug3: userauth_finish: failure partial=0 next methods="keyboard-interactive" [preauth] debug3: mm_request_receive entering debug3: monitor_read: checking request 4 debug3: mm_answer_authserv: service=ssh-connection, style=skey debug2: monitor_read: 4 used once, disabling now debug1: userauth-request for user didier:skey service ssh-connection method keyboard-interactive [preauth] debug1: attempt 1 failures 0 [preauth] debug2: input_userauth_request: try method keyboard-interactive [preauth] debug1: keyboard-interactive devs [preauth] debug1: auth2_challenge: user=didier devs= [preauth] debug1: kbdint_alloc: devices 'bsdauth' [preauth] debug2: auth2_challenge_start: devices bsdauth [preauth] debug2: kbdint_next_device: devices <empty> [preauth] debug3: userauth_finish: failure partial=0 next methods="keyboard-interactive" [preauth] Received disconnect from 10.0.0.9: 14: No supported authentication methods available [preauth] debug1: do_cleanup [preauth] debug1: monitor_read_log: child log fd closed debug3: mm_request_receive entering debug1: do_cleanup debug1: Killing privsep child 17082 -----Original Message----- From: Johan Mellberg [mailto:johan.mellb...@gmail.com] Sent: Tuesday, September 3, 2013 11:47 To: misc@openbsd.org Subject: Re: AuthenticationMethods skey, passwd: howto syntax? 2013/9/3 Didier Wiroth <didier.wir...@mesr.etat.lu> > Yes I did. > Skey and password currently work (as standalone authentication) with > sshd and of course on the console (via username:skey syntax). > But If I try to use skey & password authentication together (via the > AuthenticationMethods) in sshd it doesn't work. > > Ok. > Hello, > > (I'm running 5.4-current) > > I would like to use multiple authentication in sshd : > > 2) skey > > 2) and passwd (as further authentication) > > > > I tried many different settings but I can't find the correct syntax > > for the AuthenticationMethod parameter. > > > It is hard to know what to suggest that you have not already tried... But (without having tried so no guarantees) here is what I would try: AuthenticationMethods keyboard-interactive:skey password Note the space, the comma signifies alternatives, space means a new list, one method from each list is required. New since OpenSSH 6.2 I think? This is if I read the sshd_config man page correctly. /Johan