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

Add docs section covering SSH configuration #620

Open
garethgeorge opened this issue Dec 23, 2024 Discussed in #341 · 0 comments
Open

Add docs section covering SSH configuration #620

garethgeorge opened this issue Dec 23, 2024 Discussed in #341 · 0 comments
Assignees

Comments

@garethgeorge
Copy link
Owner

Creating a bug tracking creating a docs section based on Glideh's write up:

Discussed in #341

Originally posted by Glideh June 18, 2024
For people like me that mostly need SFTP repos, it's cool to be able to configure the SSH config in one file, so we just need to set the sftp:host:target repo URI at creation.

Example

  • Create a ssh directory
mkdir ./ssh
  • Create the ssh/config file
Host host
    Hostname truc.chouette.fr
    Port 12345
    User me
  • Generate the known_hosts
ssh-keyscan -H -p 12345 truc.chouette.fr > ./ssh/known_hosts
  • Create a key
ssh-keygen -f ./ssh/id_rsa
  • Set the expected permissions
chmod 700 ./ssh
chmod 600 ./ssh/*
sudo chown -R root:root ./ssh/
  • Mount the directory at the default location

compose.yml

services:
  backrest:
#...
    volumes:
#...
      - ./ssh:/root/.ssh
  • Now we can create a repo with just sftp:host:target as URI

Maybe this would deserve a README section, what do you think ?

@garethgeorge garethgeorge self-assigned this Dec 23, 2024
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