-
Notifications
You must be signed in to change notification settings - Fork 259
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
rsnapshot misinterprete ssh_args (Unexpected remote arg) #258
Comments
The easiest and cleanest way to do this, would be:
If you normally use another IdentityFile and this would disturb your other logins to this machine, you can use another name as an alias for this machine in your source argument in rsnapshot.conf and on the Host line in .ssh/config, but then you will need the HostName line either IP address or name. |
Thank you very much! This workaround works for our case! |
I haven't really kept up with this recently, but I was thinking a few years
ago that if sub print_cmd in rsnapshot added quotes when there are spaces
(or other characters that would need quoting) inside any of the array
elements it is printing, that would make it a lot easier for people to copy
& paste commands from rsnapshot -v output or log files and might therefore
reduce some of the confusion we've seen about quoting in general (which has
sometimes lead to some versions of rsnapshot treating quoting/spaces in
incompatible ways to other versions in certain situations).
I think it would also fix the issue that inkvisitor raised, by adding
quotes to the command printed by rsnapshot -t when ssh_args has spaces in
it (but without making a special case in rsnapshot for ssh_args
specifically).
…On Fri, 12 Jun 2020 at 00:39, Inkvisitor ***@***.***> wrote:
The easiest and cleanest way to do this, would be:
* leave `ssh_args` out
* change ***@***.***` to `remote.server.tld` in your rsnapshot configuration
* configure ssh to use your key in `/root/.ssh/config`:
Host remote.server.tld
IdentityFile /etc/rsnapshot.d/id_rsa
# Port 22 # only needed if you changed it somewhere else
# User root # ssh uses the local user name for the remote login if not changed, so probably not needed
# HostName 123.456.789.123 # only needed if the name resolution (DNS or hosts) does not work, or remote.server.tld is an alias just for rsnapshot, see below.
If you normally use another IdentityFile and this would disturb your other
logins to this machine, you can use another name as an alias for this
machine in your source argument in rsnapshot.conf *and* on the Host line
in .ssh/config, but then you will need the HostName line either IP address
or name.
Thank you very much! This workaround works for our case!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#258 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPTLCU6AOHGP3GNDYN3DNLRWDUC3ANCNFSM4NM5VTUA>
.
--
David Keegel <david.keegel@gmail.com>
|
I'm having the same issue but I don't really understand the solution. Can you break it down in layman's terms or tell me what I should google to figure this out? I'm lost at this line "hange |
This is to use a ssh configuration to access the server instead passing args to ssh. In your $HOME/.ssh/config file set configurations parameter to connect to server. For example you want to connect to server 1.2.3.4 as root, then set:
you can also configure a port (if different from 22), or identityfile if different from that used by you user. then you call: |
Thanks for this. I appreciate it.
Mar. 30, 2022 7:47:37 a.m. backit ***@***.***>:
… I'm having the same issue but I don't really understand the solution. Can you break it down in layman's terms or tell me what I should google to figure this out? I'm lost at this line "hange ***@***.**** to *remote.server.tld* in your rsnapshot configuration"
This is to use a ssh configuration to access the server instead passing args to ssh. In your $HOME/.ssh/config file set configurations parameter to connect to server. For example you want to connect to server 1.2.3.4 as root, then set:
Host myserver
hostname 1.2.3.4
user root
you can also configure a port (if different from 22), or identityfile if different from that used by you user.
then you call:
*ssh myserver*
and you connect to 1.2.3.4 as root
—
Reply to this email directly, view it on GitHub[#258 (comment)], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AM5FBGDFM6EJYXATSTCSN2TVCQ5NNANCNFSM4NM5VTUA].
You are receiving this because you commented. [data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD8AAAA/CAYAAABXXxDfAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAABcSURBVGgF7dABDQAAAMKg909tDwcRKAwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDgZGA+QwABeHisFQAAAABJRU5ErkJggg==###24x24:true###][Tracking image][https://github.com/notifications/beacon/AM5FBGFSIQIW6HWJXII4VETVCQ5NNA5CNFSM4NM5VTUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOICG57IY.gif]
|
You're right. That's exactly how I fixed it. Thanks for responding.
Apr 9, 2023 9:12:40 p.m. AdamDanischewski ***@***.***>:
…
I think you may need to just *"*quote*"* the ssh args, I had this error and got it to go just surrounding the --rsh w/ssh_args option like this:
*/usr/bin/rsync -a --bwlimit=30000 --rsh="/usr/bin/ssh -p 22 -i /etc/rsnapshot.d/id_rsa" ***@***.***:/var/www/ /backup/rsnapshot/remote.server.tld/monthly.0/remote.server.tld/*
—
Reply to this email directly, view it on GitHub[#258 (comment)], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AM5FBGCZHVR75CZPOOH4E3TXANNARANCNFSM4NM5VTUA].
You are receiving this because you commented.[Tracking image][https://github.com/notifications/beacon/AM5FBGF2QKPPOTALLRORQSTXANNARA5CNFSM4NM5VTUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOLF5YZQA.gif]
|
Hello,
The situation is that
rnapshot
formsssh_args
forrsync
that way so they became as source instead of arguments or something like that. Examples and detailed explanation below:version: rsnapshot-1.4.3-1
Here is rsnapshot config:
here is part of result of
rsnapshot -t -c /etc/rsnapshot.d/rsnapshot_remote.server.tld monthly
command (just to be briefer):If you would run the
rsync
command directly as it is (from console), it would return error:But, if I put the
--rsh
arguments for thersync
command between quotes, it works as expected:So here is the question: is it possible to make
rsnapshot
acting the similar way?The text was updated successfully, but these errors were encountered: