After update Mac OS Sierra, Can not use ssh login remote system,how can I fix this?

Comment the following lines in /etc/ssh/ssh_config from

# System-wide defaults set by MIT Kerberos Extras
Host *
  GSSAPIAuthentication yes
  GSSAPIDelegateCredentials yes
  GSSAPIKeyExchange yes

to

# System-wide defaults set by MIT Kerberos Extras
#Host *
#  GSSAPIAuthentication yes
#  GSSAPIDelegateCredentials yes
#  GSSAPIKeyExchange yes

One way to solve this question is copy a ssh binary from an older Mac and place this binary in path before /usr/bin/ssh, ex: (copy from el capitan box) /usr/bin/ssh => ~/bin/ssh, then add $HOME/bin to your PATH before anything else.

The reason is GSSAPITrustDNS and GSSAPIKeyExchange patches are no longer applied by apple, Starting with Sierra when they upgraded OpenSSH to 7.2p2, So one options is to downgrade to the old OS version, if you have to use kerberos+ ssh.


You probably just need to disable GSSAPITrustDns in the ssh config. The following snippet does it by adding a # before the line:

vi ~/.ssh/config

:%s/GSSAPITrustDns/# GSSAPITrustDns/g

:wq

Similarly, comment other options also, like gssapikeyexchange etc.

Tags:

Macos

Ssh