Access Keys:
Skip to content (Access Key - 0)

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
  1. Press i key for vi editor insert mode.
  2. 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
    
  3. Press esc
  4. Type Shift-z-z to write the file

update 9/11/2019

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

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

IS&T Contributions

Documentation and information provided by IS&T staff members


Last Modified:

March 16, 2022

Get Help

Request help
from the Help Desk
Report a security incident
to the Security Team
Labels:
mac mac Delete
sierra sierra Delete
ssh ssh Delete
c-macos-sierra c-macos-sierra Delete
ftp ftp Delete
sftp sftp Delete
fetch fetch Delete
gssapikeyexchange gssapikeyexchange Delete
mojave mojave Delete
high high Delete
dialup dialup Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
Feedback
This product/service is:
Easy to use
Average
Difficult to use

This article is:
Helpful
Inaccurate
Obsolete
Adaptavist Theme Builder (4.2.3) Powered by Atlassian Confluence 3.5.13, the Enterprise Wiki