Pubkey's working great (still) with 'oldshell'dherr wrote:Key based ssh is working. Make sure your permissions are not any more open than mine and make sure the name of your auth file is the same. There have been changes over the years, but what I show here is currently working:
$ ls -la .ssh/
total 24
drwx------. 1 dherr user 4096 Jun 30 2017 .
drwx------. 1 dherr user 4096 Apr 19 11:25 ..
-rw-------. 1 dherr user 1192 Jun 30 2017 authorized_keys
-rw-r--r--. 1 dherr user 204 Mar 27 17:42 known_hosts
With new 'sh.sonic.net', keyboard-interactive works find; pubkey, not.
Here's what I see:
Code: Select all
ssh -l myacct -o "PreferredAuthentications keyboard-interactive" sh.sonic.net
Password:
Last login: ... from ....lightspeed.snmtca.sbcglobal.net
...
ls -al .ssh
drwx------. 1 myacct user 4096 Apr 19 13:55 .
drwx------. 1 myacct user 4096 Apr 19 13:51 ..
-rw-------. 1 myacct user 846 Apr 19 13:55 authorized_keys
ssh -Q cipher
3des-cbc
blowfish-cbc
cast128-cbc
arcfour
arcfour128
arcfour256
aes128-cbc
aes192-cbc
aes256-cbc
[email protected]
aes128-ctr
aes192-ctr
aes256-ctr
[email protected]
[email protected]
[email protected]
ssh -Q mac
hmac-sha1
hmac-sha1-96
hmac-sha2-256
hmac-sha2-512
hmac-md5
hmac-md5-96
hmac-ripemd160
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
ssh -Q kex
diffie-hellman-group1-sha1
diffie-hellman-group14-sha1
diffie-hellman-group14-sha256
diffie-hellman-group16-sha512
diffie-hellman-group18-sha512
diffie-hellman-group-exchange-sha1
diffie-hellman-group-exchange-sha256
ecdh-sha2-nistp256
ecdh-sha2-nistp384
ecdh-sha2-nistp521
curve25519-sha256
[email protected]
gss-gex-sha1-
gss-group1-sha1-
gss-group14-sha1-
exit
locally, my ssh_config,
Host sh.sonic.net
User myacct
HostKeyAlgorithms ssh-ed25519,ssh-rsa
Ciphers [email protected],aes128-cbc,[email protected],aes128-ctr
MACs [email protected],[email protected],hmac-md5,hmac-sha1
KexAlgorithms [email protected],diffie-hellman-group-exchange-sha256,diffie-hellman-group1-sha1
ssh -l myacct -o "PreferredAuthentications publickey" sh.sonic.net
Permission denied (publickey,keyboard-interactive).
ssh -l myacct -o "PreferredAuthentications publickey" -v sh.sonic.net
...
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
debug1: match: OpenSSH_7.4 pat OpenSSH* compat 0x04000000
debug1: Remote is NON-HPN aware
debug1: Authenticating to sh.sonic.net:22 as 'myacct'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: AUTH STATE IS 0
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ssh-rsa
debug1: REQUESTED ENC.NAME is '[email protected]'
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: [email protected]
debug1: REQUESTED ENC.NAME is '[email protected]'
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: [email protected]
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:2...
debug1: Host 'sh.sonic.net' is known and matches the RSA host key.
debug1: Found key in /etc/ssh/ssh_known_hosts:31
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /etc/ssh/ssh.desk.ed25519
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Offering RSA public key: /etc/ssh/ssh.desk.rsa
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: No more authentication methods to try.
Permission denied (publickey,keyboard-interactive).