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

sftp: support ssh certificates #465

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

btoews
Copy link
Contributor

@btoews btoews commented Mar 27, 2023

I was playing around with replicating to another fly.io app.

Comment on lines +145 to +132
certBuf, err := os.ReadFile(c.KeyPath + "-cert.pub")
if err != nil {
return nil, err
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a separate certificate path (e.g. c.CertPath)? That seems better than assuming the user has the cert relative to the key path.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most SSHy things have kind of a convention around the names of public keys and certs relative to the private key. If you ssh -i ~/foobar, it'll try both the plan key and ~/foobar-cert.pub. That said, there's no harm in being explicit and using a separate config if you'd rather.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd prefer it be explicit if the convention isn't required. Also, I'm rolling back replication changes that ended up moving to LiteFS so I'll merge this in after I finish that.

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

Successfully merging this pull request may close these issues.

None yet

2 participants