Add password authentication for SSH

This commit is contained in:
Fuxino
2023-06-02 00:09:14 +02:00
parent 4f3d83f458
commit 3d3fbbcbd9
3 changed files with 64 additions and 19 deletions

View File

@@ -55,7 +55,7 @@ It's possible to use a remote server as destination for the backup. Just use the
For this to work, rsync must be installed on the server too.
### Server authentication
Right now only authentication using SSH key works. The best way to handle the authentication is to have an ssh agent running on your system, otherwise if a passphrase is necessary to unlock the ssh key, it will be necessary to enter it more than once.
The best way to handle the authentication is to have an ssh agent running on your system, otherwise if a passphrase is necessary to unlock the ssh key, it will be necessary to enter it more than once.
If needed, it's possible to specify the ssh key location with the --keyfile argument or in the configuration file.
To be able to connect to the user's ssh agent when running simple_backup with sudo, make sure to preserve the SSH_AUTH_SOCK environment variable. For example:
@@ -65,3 +65,4 @@ sudo --preserve-env=SSH_AUTH_SOCK -s simple_backup [options]
```
or by editing the sudoers file.
If SSH key authentication is not available, password authentication will be used instead.