samba-bugs at samba.org
2014-Apr-17 18:30 UTC
[Bug 10557] New: .ssh/config settings are incompletely applied with -e or --rsh
https://bugzilla.samba.org/show_bug.cgi?id=10557 Summary: .ssh/config settings are incompletely applied with -e or --rsh Product: rsync Version: 3.1.1 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P5 Component: core AssignedTo: wayned at samba.org ReportedBy: kesten.broughton at gmail.com QAContact: rsync-qa at samba.org .ssh/config settings are not applied at all without coaxing. The IdentityFile setting is not passed to rsync. For better formatting, see the report here. http://unix.stackexchange.com/questions/94421/how-to-use-ssh-config-setting-for-each-server-by-rsync/125251#125251 If i force it with -F "path to .ssh/conf" then the IdentityFile is used correctly, but the jump-hosting fails. sudo /usr/local/bin/rsync -az -e "ssh -F /Users/kbroughton/.ssh/config -i /Users/kbroughton/.ssh/identities/21ct_dev1_key" /var/data/sources/data.tar.gz cloud-user at 21ct-dev1-pivot:/home/cloud-user Error without -F or -i Permission denied (publickey,gssapi-keyex,gssapi-with-mic). ssh_exchange_identification: Connection closed by remote host rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.0] Error with hostname /var/lib/lynxeon/sources/LYNXeon3_fraud_demo_data --progress ssh: Could not resolve hostname 21ct-dev1-lynx01: nodename nor servname provided, or not known rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.0] ssh 21ct-dev1-lynx01 works rsync -e "ssh -F /Users/kbroughton/.ssh/config" /local_src 10.x.y.z:/remote_dest works ENVIRONMENT local Mac maverics both [default=2.6.9] and homebrew installed 3.1.0 were tried, with no difference. Remote centos6.5 rsync 3.0.9 I would expect that by default or with a CLI option rsync would read the local ~/.ssh/config file and apply ALL of its settings including jump-hosting when the -e or -rsh option is used. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
samba-bugs at samba.org
2014-Apr-17 18:35 UTC
[Bug 10557] .ssh/config settings are incompletely applied with -e or --rsh
https://bugzilla.samba.org/show_bug.cgi?id=10557 --- Comment #1 from Kevin Korb <rsync at sanitarium.net> 2014-04-17 18:35:45 UTC --- The key here is the sudo. ssh will always look to ~/.ssh/config but once you sudo your ~ is /root instead of /Users/kbroughton. Duplicate your ~/.ssh/config in ~root/.ssh/config and it should work fine. The reason that -F partially works is because the ProxyCommand is a second ssh session that doesn't have the -F param so is again looking at /root/.ssh/config. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
samba-bugs at samba.org
2014-Apr-17 18:44 UTC
[Bug 10557] .ssh/config settings are incompletely applied with -e or --rsh
https://bugzilla.samba.org/show_bug.cgi?id=10557 --- Comment #2 from kesten <kesten.broughton at gmail.com> 2014-04-17 18:44:27 UTC --- Thanks for the faster-than-light response. I mounted the samba file server to my mac as recommended in https://discussions.apple.com/message/25112468#25112468 I then symlink and chown to kbroughton so that everything is owned by me down to /var/lib which is of course root:wheel [kbroughton at mb-kbroughton:lynx-ansible/21ct-ansible + (develop)] ls /var/lib/lynxeon/sources/LYNXeon3_fraud_demo_data lrwxr-xr-x 1 kbroughton 21TECHNOLOGIES\Domain Users 78B Apr 17 09:48 /var/lib/lynxeon/sources/LYNXeon3_fraud_demo_data -> /Volumes/Temp/Departmental_Shares/Lynxeon/FileArchive/LYNXeon3_fraud_demo_data However, I get a file permission error without sudo [kbroughton at mb-kbroughton:lynx-ansible/21ct-ansible + (develop)] /usr/local/bin/rsync -az -e "ssh -i /Users/kbroughton/.ssh/identities/21ct_dev1_key" /var/lib/lynxeon/sources/LYNXeon3_fraud_demo_data/fraud_1_2_bootstrap.gz cloud-user at 21ct-dev1-lynx01:/var/lib/lynxeon/sources/LYNXeon3_fraud_demo_data --progress sending incremental file list rsync: change_dir "/var/lib/lynxeon/sources/LYNXeon3_fraud_demo_data" failed: Permission denied (13) Killed by signal 1. rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1236) [sender=3.1.0] I can ls just fine so it seems i've gotten around the apple bug mentioned in the link, but rsync still has a problem. There is not /root to try putting the .ssh/config there as you suggested. thanks -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
samba-bugs at samba.org
2014-Apr-17 19:37 UTC
[Bug 10557] .ssh/config settings are incompletely applied with -e or --rsh
https://bugzilla.samba.org/show_bug.cgi?id=10557 --- Comment #3 from Kevin Korb <rsync at sanitarium.net> 2014-04-17 19:37:06 UTC --- OK, I was speaking from a Linux perspective. I have no idea what OSX uses as root's home dir. Simply put, under sudo you are running as root and root has a different home dir therefore a different ~/.ssh/config file. Also, note that permissions and usernames matter at both ends. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
samba-bugs at samba.org
2014-Apr-19 16:47 UTC
[Bug 10557] .ssh/config settings are incompletely applied with -e or --rsh
https://bugzilla.samba.org/show_bug.cgi?id=10557 Wayne Davison <wayned at samba.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID --- Comment #4 from Wayne Davison <wayned at samba.org> 2014-04-19 16:47:00 UTC --- What you should try is the sudo ssh command to see what errors it is generating. I imagine that root is refusing to use a file owned by someone else. You can instead copy the config and key to root's .ssh dir and set it up to work that way. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.