0 votes
by (180 points)

Hi Team

I want to download a file from Mainframe server to windows server using Rebex sftp password and password less approach. How to do it ?
For "with password" approach, I am getting error "No Such a file;No such file", do you know why ?

Sftp objsftp = null;
objsftp= new Sftp();
objsftp.Connect("servername");
objsftp.Login("ftp
user", "password");
objsftp.GetFile("'N845.N8451EXP.EXPINFO(+0)'", @"D:\test\FromMainframe.text");

Also in order to achieve this sftp passwordless, what needs to be done ?
Please let me know if you have any suggestions. Its very urgent.

Regards
Sarang Deshpande

1 Answer

0 votes
by (147k points)

Hi,

  1. The "No such file" error is a server-side error that corresponds to SFTP error code SSHFXNOSUCHFILE. By reporting this error, the server indicates that the 'N845.N8451EXP.EXPINFO(+0)' file does not exist. Perhaps you need to refer to this file using a different name? Try calling GetList to see whether you are able to retrieve a list of files.

  2. Passwordless SFTP is very seldom used. The SSH protocol (SFTP's underlying secure communication layer) does allows password-less authentication, but user name still needs to be specified. When a user account is configured to allow password-less authentication, the password you pass to the Login method is irrelevant. However, the SSH protocol does not specify any universal user name for such purposes. Please refer to the mainframe's SFTP server manual for details on how to achieve this

  3. When you need urgent support, please make sure we are able to associate your support request with an active Rebex maintenance and support contract. Otherwise, we will be unable to prioritize your requests properly. At the moment, we cannot find your e-mail in our database - one of my colleagues will contact you via e-mail to sort this out soon.

...