I'm trying to setup SSH access to my FreeNAS using SSH public keys and I've run into a problem I've not been able to find a solution to.
I have a user, mattias, to which I paste an RSA public key into the "SSH Public Key" field. Afterwards when I try to SSH
I get
From the last section "Trying private key" it looks like it's not even checking against the correct private key. The correct private key is
One interesting thing is, if I assign the same public key to the
Image of
Image of
Any ideas?
I would gladly accept the answer "user error" if the same public key didn't work for the
I have a user, mattias, to which I paste an RSA public key into the "SSH Public Key" field. Afterwards when I try to SSH
ssh mattias@192.168.1.30
I get
Permission denied (publickey)
. If I use the -v
I get the following:Code:
$ ssh mattias@192.168.1.30 -v OpenSSH_7.3p1, OpenSSL 1.0.2k 26 Jan 2017 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Connecting to 192.168.1.30 [192.168.1.30] port 22. debug1: Connection established. debug1: identity file /c/Users/USERNAME/.ssh/id_rsa type 1 debug1: key_load_public: No such file or directory debug1: identity file /c/Users/USERNAME/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /c/Users/USERNAME/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /c/Users/USERNAME/.ssh/id_dsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /c/Users/USERNAME/.ssh/id_ecdsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /c/Users/USERNAME/.ssh/id_ecdsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /c/Users/USERNAME/.ssh/id_ed25519 type -1 debug1: key_load_public: No such file or directory debug1: identity file /c/Users/USERNAME/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.3 debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4-hpn14v5 debug1: match: OpenSSH_7.4-hpn14v5 pat OpenSSH* compat 0x04000000 debug1: Authenticating to 192.168.1.30:22 as 'mattias' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256@libssh.org 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:XdfLFnuYX09cbPPUobn5bvLz4UDNklFucIYcVp/iNA0 debug1: Host '192.168.1.30' is known and matches the ECDSA host key. debug1: Found key in /c/Users/USERNAME/.ssh/known_hosts:1 debug1: rekey after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: rekey after 134217728 blocks debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,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 RSA public key: /c/Users/USERNAME/.ssh/id_rsa debug1: Authentications that can continue: publickey debug1: Trying private key: /c/Users/USERNAME/.ssh/id_dsa debug1: Trying private key: /c/Users/USERNAME/.ssh/id_ecdsa debug1: Trying private key: /c/Users/USERNAME/.ssh/id_ed25519 debug1: No more authentication methods to try. Permission denied (publickey).
From the last section "Trying private key" it looks like it's not even checking against the correct private key. The correct private key is
id_rsa
not id_dsa
.One interesting thing is, if I assign the same public key to the
root
user it works...Image of
mattias
settings:Image of
root
settings:Any ideas?
I would gladly accept the answer "user error" if the same public key didn't work for the
root
user. But since it does, I'm lost...
Last edited: