viant / afs

Abstract File Storage
Apache License 2.0
297 stars 34 forks source link

Pass `ssh.ClientConfig` to scp.Service #10

Closed terwey closed 2 years ago

terwey commented 2 years ago

Currently I do not see a way to pass a ssh.ClientConfig to the scp.Service. The readme on https://github.com/viant/afs/tree/master/scp shows an example for the scp.Storage to do so.

Reason for this is the default MACs set by Go for SSH are not compatible with the one's we currently expose on servers.

If this is not something currently possible, I can send a PR that adds the functionality, but I am unsure if I am maybe missing something obvious.

adranwit commented 2 years ago

Added *ssh.ClientConfig option

adranwit commented 2 years ago

The following should work fs := afs.New() reader, err := fs.Open("ssh://host/asset", &ssh. ClientConfig{...})