I cannot login as root to my mac mini from a linux computer

From my Linux desktop (Fedora), I am trying to log in as root to my Mac mini computer.

$ ssh root@my-mac-mini
Connection closed by 10.0.1.12

10.0.1.12 is the mac mini ip address.

In the log file /var/log/system.log, I see:

Apr 30 11:57:05 my-mac-mini.my-domain.com sshd[8903]: fatal: Access denied for user root by PAM account configuration [preauth]

With more verbose:

$ ssh -v root@my-mac-mini
OpenSSH_6.4, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /home/john/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 51: Applying options for *
debug1: Connecting to my-mac-mini [10.0.1.12] port 22.
debug1: Connection established.
debug1: identity file /home/john/.ssh/id_rsa type 1
debug1: identity file /home/john/.ssh/id_rsa-cert type -1
debug1: identity file /home/john/.ssh/id_dsa type 2
debug1: identity file /home/john/.ssh/id_dsa-cert type -1
debug1: identity file /home/john/.ssh/id_ecdsa type -1
debug1: identity file /home/john/.ssh/id_ecdsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2
debug1: match: OpenSSH_6.2 pat OpenSSH*
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr [email protected] none
debug1: kex: client->server aes128-ctr [email protected] none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<3072<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA 78:9b:06:12:bc:c8:15:56:de:38:a9:7b:45:07:c2:26
debug1: Host 'my-mac-mini' is known and matches the RSA host key.
debug1: Found key in /home/john/.ssh/known_hosts:43
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/john/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: read PEM private key done: type RSA
Connection closed by 10.0.1.12

In /etc/sshd_config, I have

PermitRootLogin yes

How can I fix this?


Solution 1:

I had similar problem which is solved by following answer:

Check your Remote Login settings under System Preferences > Sharing > Remote Login

Specifically, who is allowed to log in?