Topic: Problems to SFTP MySecureShell using sshtools's SftpClient Java API

I am using SftpClient API in my java code perform operations like ls etc.

SftpClient  constructor take SshClient object to connect to target (Linux box in my case)  and getting  java.io.EOFException.

Can anybody help me on this, how to get this work in java code using SftpClient Java API .

Thanks in advance,
Deepak

Re: Problems to SFTP MySecureShell using sshtools's SftpClient Java API

Hi,

Try to check MySecureShell log (by default: /var/log/sftp-server.log) to have more informations...

Re: Problems to SFTP MySecureShell using sshtools's SftpClient Java API

Hello teka,

Thanks! for the reply.
I am getting following msg in logs whenever I try to connect through SFTP java client API's

2010-04-30 06:37:29 [26737]New client [test1] from [::ffff:137.72.242.25]
2010-04-30 06:37:30 [26737][test1][::ffff:137.72.242.25]Quit.

and getting following exception in code

An unexpected exception was caught: null [java.io.EOFException]]

--Deepak

Re: Problems to SFTP MySecureShell using sshtools's SftpClient Java API

Hi,

Which version of protocol SFTP are you using ?

Since a long time, MySecureShell has a bug with SFTP v4... but SFTP v3 or v5 works perfectly.
Maybe it's your problem ? smile

Re: Problems to SFTP MySecureShell using sshtools's SftpClient Java API

SFTP protocol version is 3

I have also tried by adding the following entry in sftp_config to enable SSH as well.

<User test1>
Shell /bin/bash
</User>

I get the "Shell is Disabled!" in response if i do not add the above entry in config.

Please let me know if I need to check some more configuration to debug this issue.

Thanks,
Deepak

Re: Problems to SFTP MySecureShell using sshtools's SftpClient Java API

Please give more information about EOFException (after what ? in response of ?)

Thanks smile