Skip to content

Fix SSH config to allow either a public key or known hosts file to be set - #885

Merged
m90 merged 2 commits into
offen:mainfrom
J4kubS:J4kubS-fix-ssh-config
Oct 22, 2026
Merged

m90 merged 2 commits into
offen:mainfrom
J4kubS:J4kubS-fix-ssh-config

Conversation

@J4kubS

@J4kubS J4kubS commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

While trying to update my setup to v2.49.2 I've noticed that I cannot set SSH_KNOWN_HOSTS_FILE. The current config validation requires SSH_HOST_PUBLIC_KEY to be always set and SSH_KNOWN_HOSTS_FILE to never be set

Comment thread cmd/backup/config.go Outdated
Comment thread cmd/backup/config.go
if c.SSHHostName != "" && !c.SSHInsecureIgnoreHostKey && (c.SSHHostPublicKey == "" || c.SSHKnownHostsFile != "") {
err = errwrap.Wrap(nil, "SSH hostname given without a public key or known_hosts, refer to the documentation for guidance")
return
if c.SSHHostName != "" && !c.SSHInsecureIgnoreHostKey {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, that's already easier on the eye. I'll merge and release this once CI is green.

@m90
m90 merged commit 15b6107 into offen:main Oct 22, 2026
3 checks passed
@J4kubS
J4kubS deleted the J4kubS-fix-ssh-config branch October 22, 2026 16:35
@m90

m90 commented Oct 22, 2026

Copy link
Copy Markdown
Member

This is now released in v2.49.3, thanks a lot for taking care of this so quickly.

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.

2 participants