# 오류: ssh-add: 유효하지 않은 옵션 -- apple-use-keychain

이 오류는 ssh-add의 버전이 macOS 키 집합 통합을 지원하지 않음을 의미하므로 키 집합에 암호를 저장할 수 있습니다.

Apple 표준 버전의 `--apple-use-keychain`에 있는 `ssh-add` 옵션은 ssh-agent에 SSH 키가 추가될 때 키 집합에 암호를 자동으로 저장합니다. 다른 버전의 `ssh-add`를 설치한 경우 `--apple-use-keychain`가 지원되지 않을 수 있습니다.

## 문제 해결

ssh-agent에 SSH 프라이빗 키를 추가하기 위해 Apple 버전의 `ssh-add`에 대한 경로를 지정할 수 있습니다.

```shell
/usr/bin/ssh-add --apple-use-keychain ~/.ssh/id_ed25519
```

> \[!NOTE]
> \*
> `--apple-use-keychain` 옵션은 `ssh-add`의 Apple 표준 버전에 있습니다. Monterey(12.0) 이전 macOS 버전에서는 `-K` 대신 `--apple-use-keychain`를 사용합니다.
>
> * 다른 이름으로 키를 만들거나 이름이 다른 기존 키를 추가하는 경우 명령의 \_id\_ed25519\_를 프라이빗 키 파일의 이름으로 바꿉니다.

## 추가 참고 자료

* [새 SSH 키 생성 및 ssh-agent에 추가](/ko/enterprise-server@3.20/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)
* [ssh-add에 대한 Linux 기본 페이지](http://man7.org/linux/man-pages/man1/ssh-add.1.html)
* SSH-ADD에 대한 Apple 기본 페이지를 보려면 터미널에서 `man ssh-add`를 실행합니다.