bramvdbogaerde / go-scp

Simple Golang scp client
Mozilla Public License 2.0
424 stars 89 forks source link

Bugfix/scp multi files #64

Closed qcha0 closed 1 year ago

bramvdbogaerde commented 2 years ago

@qcha0 If I may ask, what is the reason for closing this? In the case that it is simply not ready yet, you can keep it opened and continue comitting on your branch, the PR will be updated accordingly. We can merge whenever you are ready.

qcha0 commented 2 years ago

in my case, i want to copy multiple file at a time, just like

fun main() {
    ...
    client := scp.NewClient("example.com:22", &clientConfig)
    ...
    err := client.CopyFile(context.Background(), f1, "/tmp/1.txt", "0755")    // success
    ...
    err := client.CopyFile(context.Background(), f2, "/tmp/2.txt", "0755")    // failed, `ssh: StdoutPipe after process started`
}

so, i think should hold ssh client instead of ssh session.

In fact, I want to test it in fork repo first, pass it and then submit the pr.

bramvdbogaerde commented 2 years ago

Great! Please notify me whenever this is ready to merge.

qcha0 commented 2 years ago

Has passed the test in the test environment.

could you take a look, check again?

zluther89 commented 1 year ago

@bramvdbogaerde

Any updates here? I could use this for something I'm working on.

If I may suggest, @qcha0 you should add the tests into this PR to verify this works.

bramvdbogaerde commented 1 year ago

Superseded by #70 .