Q: Why do I get "Bad configuration option gssapikeyexchange" after upgrading macOS?
- After upgrading macOS and attempting to run ssh, you may see an error message like:
dhcp-18-111-116-122:~ username$ ssh username@athena.dialup.mit.edu /Users/username/.ssh/config: line 2: Bad configuration option: gssapikeyexchange /Users/username/.ssh/config: terminating, 1 bad configuration options
or
/etc/ssh/ssh_config: line 20: Bad configuration option: gssapikeyexchange /etc/ssh/ssh_config: terminating, 1 bad configuration options
How do I fix this?
Context
- You have a pre-existing .ssh/config or /etc/ssh/ssh_config file, possibly with a GSSAPIKeyExchange no setting that was previously required
Answer
- Remove or comment out lines containing GSSAPIKeyExchange
Steps
For Unix neophytes here are steps to edit the ssh_config file using the vi editor on Mac:
sudo vi /etc/ssh/ssh_config
- Press i key for vi editor insert mode.
- Use arrow keys to navigate to lines you want to delete or comment.
For example, to comment the offending line in an ssh_config script:# GSSAPIKeyExchange yes
- Press esc
- Type Shift-z-z to write the file
update 9/11/2019
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
Oct 06, 2017
Barbara Johnson
new mac (10/17) needed to comment additional lines with GSSAPI. See article https://stackoverflow.com/questions/39634166/after-update-mac-os-sierra-can-not-use-ssh-login-remote-system-how-can-i-fix-th