-
Notifications
You must be signed in to change notification settings - Fork 37
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
How to specify remote scp username #8
Comments
Credenitals are supplied as options, to use user/passwor use the following: auth := scp.NewAuthProvider(nil, option.NewBasicAuth("myuser", "password")) |
How would this work with ssh keys instead of basic auth?
…Sent from my iPhone
On Feb 6, 2021, at 7:41 PM, adranwit <notifications@github.com> wrote:
Credenitals are supplied as options, to user user/passwor dyou the use the following:
auth := scp.NewAuthProvider(nil, option.NewBasicAuth("myuser", "password"))
data, err := fs.DownloadWithURL(context.Background(), "scp://127.0.0.1/etc/hosts", auth)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#8 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAAX3ZXPH2BVBQ6YNCAHR43S5XORPANCNFSM4XGK7WKA>.
|
auth := scp.NewAuthProvider(nil, option.NewBasicAuth("myuser", "password")) |
SSH auth supported methods: |
|
Thank you! |
Hello,
I was wondering how to specify the username of the remote user when using scp with LocalhostKeyAuth. It appears to try and connect as the user that is running the program (USER from env). I tried modifying the url to scp://user@host:22/path/to/file but that does not work.
Thanks!
-Will
The text was updated successfully, but these errors were encountered: