Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Support] Multiple SSH Server #491

Closed
jonathan8devs opened this issue Nov 4, 2023 · 1 comment
Closed

[Support] Multiple SSH Server #491

jonathan8devs opened this issue Nov 4, 2023 · 1 comment

Comments

@jonathan8devs
Copy link

jonathan8devs commented Nov 4, 2023

I need to connect to various servers in my personal environment, and each server requires its own key. However, how can I identify these keys so that my terminal uses the correct one?

The variant with:

Host *
    IdentitiesOnly Yes
    IdentityAgent /Users/me/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh

Host example.com
    IdentityFile /Users/me/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/PublicKeys/ertzuiolk4jhez7d89o.pub
    IdentitiesOnly yes
    User jonathan
    HostName example.com

Host example2.com
    IdentityFile /Users/me/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/PublicKeys/ertzuidfgrhez7d89o.pub
    IdentitiesOnly yes
    User jonathan
    HostName example2.com

does not work.

Load key "/Users/me/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/PublicKeys/ertzuiolk4jhez7d89o.pub": invalid format
[email protected]: Permission denied (publickey).

It is also logical that the .pub file, which only contains the public key, does not contain a link to the private key.

How does this work?

@jonathan8devs
Copy link
Author

Okay I feel a little stupid 😄
I tried again and suddenly it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant