Asking this here as I don't think it's a Linux problem.

My Mac Mini sits on a desktop and is the 'central authority' for all of my backups. I have nine Linux virtual machines on a server on which scripts run nightly to do for example, MySQL dumps and to tarball up attachment directories on my Atlassian servers. The resulting backups are then secure copied across to the Mac overnight, and of course, they're then part of the 'TimeMachine' backup and three times weekly, I swap out an external drive to which the most recent deltas are copied, and take that into my office to sit in my drawer.

It's a bit of a 'clunky' solution that has grown up over the years as my knowledge has increased.

Two days ago, I installed a new VM to run zabbix and that's working well. This meant, of course, the installation of the zabbix agent on all of the Linux machines, and I went all out and got it running on the Mac, too.

This morning, I get an e-mail from the Atlassian server, telling me that it could not scp the backups across, as the host key had changed, and warned me that there may be a 'man in the middle attack'. There wasn't, of course, as only one of my servers is public-facing, and that sits behind one firewall, has firewalld running on it and sends all traffic into the network through a small standalone RHEL server on which firewalld is running. But I follow the advice of the e-mail, and I go to the /home/darren/.ssh/known_hosts file and remove the 'offending' line. Just to be sure, I check the backup script, verify that it's using the correct key files (it is - $HOME/.ssh/id_rsa), and run a bare ssh to the Mac. Boom - connected instantly.

I run the backup script manually on the Atlassian server, and rather than transferring the file to the Mac, I get..

Permission denied (publickey).
lost connection

I decide to hose the private and public keypair and create another pair. I then ssh-copy-id them across to the Mac, and nope - same problem.

On the Mac Mini, in /var/log/syslog, I see:

Aug 25 11:01:59 macmini com.apple.xpc.launchd[1] (com.apple.quicklook[77778]): Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.quicklook

So I can only assume that in installing the Zabbix agent on the Mac Mini, something got changed.

Can anyone suggest what it might be, and how to change it back?

EDIT: the output of ssh -v

[darren@server ~]$ ssh -v -i .ssh/id_rsa darren@macos
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to macos [] port 22.
debug1: Connection established.
debug1: identity file .ssh/id_rsa type 1
debug1: identity file .ssh/id_rsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6
debug1: match: OpenSSH_7.6 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha1 none
debug1: kex: client->server aes128-ctr hmac-sha1 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<2048<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: Host 'macos' is known and matches the RSA host key.
debug1: Found key in /home/darren/.ssh/known_hosts:12
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key: .ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 533
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: client_input_global_request: rtype [email protected] want_reply 0
Last login: Sat Aug 25 11:51:33 2018 from
  • That error message doesn't have anything to do with SSH; it's related to Quick Look. Manually try to ssh/scp to the Mac mini, but include the -v flag for "verbose" and then post the output to the question.
    – Allan
    Commented Aug 25, 2018 at 10:26

1 Answer 1


I figured it out. At the same time as I had installed the zabbix VM, I had also decided to put the /etc/hosts file under ansible control. So every night, the /etc/hosts file was pushed out from the Mac, to all of the Linux VMs. Except that at the top of that file on the Mac was.. macos.invalid.com

So when the Linux VMs came to do their nightly backups, the script told them to scp the tarballs to 'macos.invalid.com' which they of course considered as 'localhost'.

Definite 'duhhh!!' moment.

Sorry to have taken your time. That'll teach me to mess with ansible (which, in my defence, does a host of other stuff on my network without causing problems!)...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .