EldoS | Feel safer!

Software components for data protection, secure storage and transfer


Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
Posted: 03/09/2011 11:08:41
by Mike Oswald (Standard support level)
Joined: 03/02/2011
Posts: 10

I'm struggling with SSH vs SFTP. My understanding is that SFTP is the abbrevaition for "SSH File Transfer Protocol".

I can connect successfully using TElSimpleSFTPClient.
The connection fails using TElSimpleSSHClient.

I am using the SimpleSFTPDemo and SimpleSFTPDemo demo projects.

I chenged both project to use
AuthenticationTypes = SBSSHConstants.Unit.SSH_AUTH_TYPE_PASSWORD;

The same Address, Username, Password and Port are used for both.

I receive the following error using TElSimpleSSHClient: "Connection Lost (error code 10053)"

Any suggestions?

// I am using the SimpleSFTPDemo sample project
// this connection test is successful

private SBSimpleSftp.TElSimpleSFTPClient SftpClient;
this.SftpClient = new SBSimpleSftp.TElSimpleSFTPClient();

SftpClient.Address = dlg.tbHost.Text;
SftpClient.Username = dlg.tbUsername.Text;
SftpClient.Password = dlg.tbPassword.Text;
SftpClient.Port = 22;
SftpClient.AuthenticationTypes = SBSSHConstants.Unit.SSH_AUTH_TYPE_PASSWORD;

// Im am using the SimpleSFTPDemo sample project
// this connection test fails. Error received is "Connection Lost (error code 10053)"
private SBSimpleSSH.TElSimpleSSHClient client;
this.client = new SBSimpleSSH.TElSimpleSSHClient();

client.Address = dlg.tbHost.Text;
client.Username = dlg.tbUser.Text;
client.Password = dlg.tbPassword.Text;
client.Port = 22;
client.AuthenticationTypes = SBSSHConstants.Unit.SSH_AUTH_TYPE_PASSWORD;
Posted: 03/09/2011 11:15:41
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

SFTP protocol is based on SSH (is used only for data transport). But to use SFTP protocol you need SFTP client, not simple SSH client.

Why do you want to connect using TElSimpleSSHClient, not TElSimpleSFTPClient? What do you want to achive?
Posted: 03/09/2011 11:25:09
by Eugene Mayevski (EldoS Corp.)

The error means that the connection is closed forcefully.

First of all please check if you set the OnKeyValidate event handler for the SSH client that you replace SFTP client with.

Next, check that the remote server allows you to connect interactively. It's a common scenario when you can connect using SSH protocol, but only SFTP subsystem is allowed, and not shell. I.e. you can't request shell channel (but you can use SFTP).

Sincerely yours
Eugene Mayevski
Posted: 03/09/2011 13:23:51
by Mike Oswald (Standard support level)
Joined: 03/02/2011
Posts: 10

The host system permits duplicate file names. Files are unique based on a batch number. During an FTP session "ls -l" displays the batch number in the file list that is returned. During an FTP session the ls command does not provide the batch number in the file list that is returned. Looks like I'm going to have to make calls to custom scripts the host facility will provide.

I'm assuming I'll need to use the SSH client to do this.
Any suggestions on this would be greatly appreciated.

Is there a way to determine on my end that I cant request a shell channel? I'm trying to determine if the problem is my code or the host is not permitting a shell channel.
Posted: 03/09/2011 13:24:39
by Mike Oswald (Standard support level)
Joined: 03/02/2011
Posts: 10

correction - SFTP "ls" command does not provide batch #.
Posted: 03/09/2011 13:32:19
by Eugene Mayevski (EldoS Corp.)

Try connecting to the host using Putty (terminal).

Sincerely yours
Eugene Mayevski
Posted: 03/10/2011 15:15:31
by Mike Oswald (Standard support level)
Joined: 03/02/2011
Posts: 10

I tried connecting using Putty. I'm prompted for the UserId and Password. I then receive the following message

"Server unexpectedly closed network connection".

This response is consistant with TElSimpleSSHClient.

I want to make sure my wording is correct when I contact the host site.
Do I simply ask them to open the shell channel for an SMTP connection? Or is there a better way to ask the question.

Posted: 03/11/2011 00:23:28
by Eugene Mayevski (EldoS Corp.)

You can ask them to open Shell access via SSH but I suspect that the server software might simply not support this.

Sincerely yours
Eugene Mayevski
Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.



Topic viewed 3949 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!