AmesCornish / buttersink

Buttersink is like rsync for btrfs snapshots
GNU General Public License v3.0
193 stars 18 forks source link

Can not use ~/.ssh/config and default identity file #42

Closed ceremcem closed 6 years ago

ceremcem commented 7 years ago

As a normal user, running buttersink with sudo prevents using $HOME/.ssh/config and $HOME/.ssh/id_rsa* and asks for password.

(fix is on the way)

AmesCornish commented 7 years ago

Did you try the -E option to sudo?

On May 24, 2017 6:54 AM, "Cerem Cem ASLAN" notifications@github.com wrote:

As a normal user, running buttersink with sudo prevents using $HOME/.ssh/config and $HOME/.ssh/id_rsa* and asks for password.

(fix is on the way)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AmesCornish/buttersink/issues/42, or mute the thread https://github.com/notifications/unsubscribe-auth/ADgOYU805OWzdOgIHe5WM_THYrB5R3fvks5r9DaqgaJpZM4NlJH- .

ceremcem commented 7 years ago

nope?

ceremcem commented 7 years ago

If the following is what you suggest, it doesn't work:

sudo -E buttersink/buttersink.py /mnt/erik/snapshots/ ssh://aea3/mnt/zencefil/snapshots
ssh: Could not resolve hostname aea3: Name or service not known

  ERROR: Fatal remote ssh server error.
AmesCornish commented 7 years ago

The above error message is about aea3. Does this give the same error message:

sudo -E ssh aea3

If so, you should troubleshoot that first. Perhaps you need a fully-qualified host name? Or a user@aea3?

ceremcem commented 7 years ago

aea3 is defined in ~/.ssh/config. I can't get what sudo -E should provide:

diff <( sudo -E env ) <( sudo env )
< PWD=/home/ceremcem
< HOME=/home/ceremcem
< _=/usr/bin/sudo
---
42a12,13
> HOME=/root