-
Notifications
You must be signed in to change notification settings - Fork 390
Open
Description
Please help!
I just realized that when I ran the code on a z/OS to receive a file from another z/OS, it always failed when trying to open the sftpClient, with error message:
sftp: "Bad message" (SSH_FX_BAD_MESSAGE)
Please note that sending file from z/OS to z/OS is successful;
And receiving/sending file between Linux and z/OS is also successful!
I tested this on 4 z/OS machines already...
I am using the 'master' branch, which is v1.13.6
Here is the related code:
sshConfig := &ssh.ClientConfig{
User: argStruct.RemoteUserName,
HostKeyCallback: ssh.InsecureIgnoreHostKey(),
Auth: []ssh.AuthMethod{
ssh.Password(argStruct.RemotePassword),
},
}
sshClient, err := ssh.Dial(sshDailNetwork, remote_hostname_and_port, sshConfig)
concurrentWriteOption := sftp.UseConcurrentWrites(true)
concurrentReadOption := sftp.UseConcurrentReads(true)
maxConcurrentOption := sftp.MaxConcurrentRequestsPerFile(100) // 100 was found to be the best during some testing
sftpClient, err := sftp.NewClient(sshClient, concurrentReadOption, concurrentWriteOption, maxConcurrentOption)
fSource, err := sftpClient.Open(srcNameRemote)
Metadata
Metadata
Assignees
Labels
No labels