Skip to content
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

rig.SSH.Upload requires sudo binary even if the remote user is root #35

Closed
mikhail-sakhnov opened this issue Aug 17, 2021 · 1 comment · Fixed by #29
Closed

rig.SSH.Upload requires sudo binary even if the remote user is root #35

mikhail-sakhnov opened this issue Aug 17, 2021 · 1 comment · Fixed by #29

Comments

@mikhail-sakhnov
Copy link

Consider following snippet of code

			SSH: &rig.SSH{
				User:    "root",
				Port:    22,
				Address: anyaddress,
			},
		}

        if err := h.Upload(localPath, remotePath); err != nil {
				return err
		}

If the remote system doesn't have sudo binary installed, than the output would be

DEBUG [ssh] 127.0.0.1:57019: executing `sudo install -D /tmp/tmp.ZY3Zwx8Pyt /remote/file/path`

while we can still use install command, because the connection user is "root"

@kke
Copy link
Contributor

kke commented Aug 17, 2021

Yep, this is a problem especially with alpine. There's the unfinished #29 PR that should fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants