diff --git a/README.md b/README.md index 561b6bf..1102edf 100644 --- a/README.md +++ b/README.md @@ -270,10 +270,11 @@ You can populate below template according to your requirements and use it as you # SSH_PASSWORD="password" # The private key path in container for SSH server -# Default value: /root/.ssh/id -# If file is mounted to /root/.ssh/id path it will be used. +# Default value: /root/.ssh/id_rsa +# 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 diff --git a/cmd/backup/config.go b/cmd/backup/config.go index c8ea41d..7c2862e 100644 --- a/cmd/backup/config.go +++ b/cmd/backup/config.go @@ -49,7 +49,7 @@ type Config struct { SSHPort string `split_words:"true" default:"22"` SSHUser 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"` SSHRemotePath string `split_words:"true"` ExecLabel string `split_words:"true"` diff --git a/test/compose/docker-compose.yml b/test/compose/docker-compose.yml index 2697656..e916e89 100644 --- a/test/compose/docker-compose.yml +++ b/test/compose/docker-compose.yml @@ -66,7 +66,7 @@ services: SSH_IDENTITY_PASSPHRASE: test1234 volumes: - ./local:/archive - - ./id_rsa:/root/.ssh/id + - ./id_rsa:/root/.ssh/id_rsa - app_data:/backup/app_data:ro - /var/run/docker.sock:/var/run/docker.sock diff --git a/test/compose/run.sh b/test/compose/run.sh index 663d514..b388341 100755 --- a/test/compose/run.sh +++ b/test/compose/run.sh @@ -71,4 +71,4 @@ fi echo "[TEST:PASS] Local backups have not been deleted." docker-compose down --volumes -rm id_rsa id_rsa.pub +rm -f id_rsa id_rsa.pub