-
Notifications
You must be signed in to change notification settings - Fork 216
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
Incompatible remote shell (was: Can't create folder (because of fish shell on remote)) #1905
Comments
Hello Denis, Thank you for taking the time to report the bug and providing the details. I appreciate your feedback. I see several options how to "solve" this issue. Please let me know what you think from your perspective and experience. Maybe you see another option? bash-only: We could check for the remote shell and give an error message if it is not bash. Easy to implement. allowlist: Check the remote shell and see if it is a shell in an allowlist. denylist: The opposite of an allowlist. posix: Force posix shells. force bash: Isn't it possible to force using bash on remote? Not Let me know what you think? Please see the projects background information to get an idea about our workflow and priorities: Best regards, |
Of the options you've proposed, I believe the most robust and maintainable solution would be the force bash approach. We can modify the SSH command to explicitly run the commands in bash, which would resolve the shell compatibility issues. Here's a draft implementation: ssh_cmd = [
'ssh',
'-o', 'ServerAliveInterval=240',
'-o', 'LogLevel=Error',
'-o', 'IdentityFile=/home/user/.ssh/backup',
'-o', 'Ciphers=aes192-ctr',
'-p', '22',
f'{user}@{host}',
'bash', '-c',
f'd=0;test -e "{remote_path}" || d=1;test $d -eq 1 && mkdir "{remote_path}"; err=$?;test $d -eq 1 && exit $err;test -d "{remote_path}" || exit 11;test -w "{remote_path}" || exit 12;test -x "{remote_path}" || exit 13;exit 20'
]
The posix and allowlist/denylist approaches seem more complicated and potentially less reliable. Forcing bash directly is a straightforward solution that should work consistently. |
I do agree. See #1965 |
Spent an hour checking that everything else works.
Please at least don't let this fail silently. cc #470
backintime-qt --backup
:remote test:
The text was updated successfully, but these errors were encountered: