Describe the bug
The Vorta Backup does not work if there is a config file with settings in .ssh/
To Reproduce
Steps to reproduce the behavior:
Then to workaround it do:
mv .ssh/config .ssh/myconfig-backupDesktop (please complete the following information):
Additional context
When the error occurs, logs are displaying :
vorta.borg.borg_thread - INFO - Running command /app/bin/borg create --list --progress --info --log-json --json --filter=AM -C lz4 /home/user/yolo
vorta.borg.borg_thread - WARNING - Remote: Bad owner or permissions on /home/user/.ssh/config
vorta.borg.borg_thread - ERROR - Connection closed by remote host. Is borg working on the server?
When I apply the workaround, logs are displaying:
vorta.borg.borg_thread - DEBUG - Using VortaSecretStorageKeyring keyring to store passwords.
asyncio - DEBUG - Using selector: EpollSelector
root - DEBUG - Found 1 passwords matching repo URL.
vorta.borg.borg_thread - INFO - Running command /app/bin/borg create --list --progress --info --log-json --json --filter=AM -C lz4 [....] /home/user/yolo
vorta.borg.borg_thread - INFO - Creating archive at "[....]"
vorta.borg.borg_thread - INFO - Remote: Storage quota [....]
I'm not sure, but it seems related to https://github.com/borgbase/vorta/issues/526
I have an ssh config and it works fine..
The error message seems to be permission related. Check your ssh config permissions.
Same here. Had my ~/.ssh/config forever and never an issue with Borg. Maybe the issue is due to a specific setting in your config?
This is for all users out there that may or may not encounter the same problem.
What I did to test and finally fix my problem :
config from .sshNow let's "brake" it:
config file inside .ssh/ with your regular user eg. touch .ssh/configWARNING - Remote: Bad owner or permissions on /home/user/.ssh/configconfig file : -rw-rw-r-- 1 user user configNow let's "fix" it:
rw for user only permissions on config. chmod 600 .ssh/configShould the message ""ERROR: Connection closed by remote host. Is borg working on server" also include the warning WARNING - Remote: Bad owner or permissions on /home/user/.ssh/config ?
Should the message ""ERROR: Connection closed by remote host. Is borg working on server" also include the warning WARNING - Remote: Bad owner or permissions on /home/user/.ssh/config
Yes, I think that would be for the best
So the issue to solve here is displaying the ssh error messages, instead of overwriting them.
Example json output:
{"type": "log_message", "time": 1607677712.879403, "message": "Remote: Warning: Identity file /home/user/.ssh/keyname not accessible: No such file or directory.", "levelname": "WARNING", "name": "root"}
{"type": "log_message", "time": 1607677712.8797798, "message": "Remote: Bad owner or permissions on /home/user/.ssh/config", "levelname": "WARNING", "name": "root"}
{"type": "log_message", "time": 1607677712.883788, "message": "Connection closed by remote host. Is borg working on the server?", "levelname": "ERROR", "name": "borg.archiver", "msgid": "ConnectionClosedWithHint"}
I think this should have a higher priority especially since the error message is not clear.
I do use the ssh config file:
Host ssh.dev.azure.com
User git
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/work_azure_rsa
IdentitiesOnly yes
Host *
User git
IdentityFile ~/.ssh/id_rsa
IdentitiesOnly yes
AddKeysToAgent yes
UseKeychain yes
Most helpful comment
So the issue to solve here is displaying the ssh error messages, instead of overwriting them.
Example json output: