Change default value for SSH identity file (#108)

* Change default value for SSH identity file

* Force remove write protected file in tests
This commit is contained in:
Frederik Ring 2022-06-17 11:28:29 +02:00 committed by GitHub
parent 0b205fe6dc
commit 1892d56ff6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 6 deletions

View File

@ -270,10 +270,11 @@ You can populate below template according to your requirements and use it as you
# SSH_PASSWORD="password" # SSH_PASSWORD="password"
# The private key path in container for SSH server # The private key path in container for SSH server
# Default value: /root/.ssh/id # Default value: /root/.ssh/id_rsa
# If file is mounted to /root/.ssh/id path it will be used. # If file is mounted to /root/.ssh/id_rsa path it will be used. Non-RSA keys will
# also work.
# SSH_IDENTITY_FILE="/root/.ssh/id" # SSH_IDENTITY_FILE="/root/.ssh/id_rsa"
# The passphrase for the identity file # The passphrase for the identity file

View File

@ -49,7 +49,7 @@ type Config struct {
SSHPort string `split_words:"true" default:"22"` SSHPort string `split_words:"true" default:"22"`
SSHUser string `split_words:"true"` SSHUser string `split_words:"true"`
SSHPassword string `split_words:"true"` SSHPassword string `split_words:"true"`
SSHIdentityFile string `split_words:"true" default:"/root/.ssh/id"` SSHIdentityFile string `split_words:"true" default:"/root/.ssh/id_rsa"`
SSHIdentityPassphrase string `split_words:"true"` SSHIdentityPassphrase string `split_words:"true"`
SSHRemotePath string `split_words:"true"` SSHRemotePath string `split_words:"true"`
ExecLabel string `split_words:"true"` ExecLabel string `split_words:"true"`

View File

@ -66,7 +66,7 @@ services:
SSH_IDENTITY_PASSPHRASE: test1234 SSH_IDENTITY_PASSPHRASE: test1234
volumes: volumes:
- ./local:/archive - ./local:/archive
- ./id_rsa:/root/.ssh/id - ./id_rsa:/root/.ssh/id_rsa
- app_data:/backup/app_data:ro - app_data:/backup/app_data:ro
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock

View File

@ -71,4 +71,4 @@ fi
echo "[TEST:PASS] Local backups have not been deleted." echo "[TEST:PASS] Local backups have not been deleted."
docker-compose down --volumes docker-compose down --volumes
rm id_rsa id_rsa.pub rm -f id_rsa id_rsa.pub