Saya tidak bisa masuk sebagai root ke mac mini saya dari komputer linux

3

Dari desktop Linux saya (Fedora), saya mencoba masuk sebagai root ke komputer mini Mac saya.

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

10.0.1.12 adalah alamat ip mini mac.

Dalam file log /var/log/system.log, saya melihat:

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

Dengan lebih banyak kata kerja:

$ 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

Dalam /etc/sshd_config, saya punya

PermitRootLogin yes

Bagaimana saya bisa memperbaikinya?

Fuji San
sumber
1
Bisakah Anda login sebagai root secara lokal (dari Terminal)? Bisakah Anda masuk ke pengguna lain melalui ssh? Apakah Anda me-restart sshdsetelah pengaturan PermitRootLoginke yes?
nohillside
1
root diaktifkan sehingga saya bisa masuk sebagai root secara lokal. Saya juga bisa masuk sebagai pengguna lain melalui ssh. Saya memulai kembali sshd dengan launchctl (sudo launchctl membongkar /System/Library/LaunchDaemons/ssh.plist).
Fuji San

Jawaban:

6

Saya memiliki masalah serupa yang diselesaikan dengan jawaban berikut :

Periksa pengaturan Remote Login Anda di System Preferences> Sharing> Remote Login

Khususnya, siapa yang diizinkan masuk?

Atilla Ozgur
sumber