You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by S James S Stapleton <st...@osu.edu> on 2008/11/25 18:00:38 UTC
FTPSClient/Auth issues
I have a sever (myserver), which I can log into via sftp/commandline from
cygwin or the *nix of my choice:
$ sftp jim@myserver
Connecting to myserver...
Password: [my password entered here]
sftp> exit
I am attempting to make a practice ftps link for another application. I am
testting with a command line app that lets me upload a file via command line
(I give my username, password, local file, and remote location via command
line). I know the password isn't secure here, but this is a small test
server and I change my password when testing.
The problem is, I keep getting the following error:
534 Kerberos Authentication not enabled.
The relevant output section looks like this:
Attempting Connect. Authvalue: jim:[my pass]
[TRACE]
[TRACE]534 Kerberos Authentication not enabled.
[TRACE]
[TRACE]
org.apache.commons.net.ftp.FTPSClient.execAUTH(FTPSClient.java:188)
[TRACE]
org.apache.commons.net.ftp.FTPSClient._connectAction_(FTPSClient.java:170)
[TRACE]
org.apache.commons.net.SocketClient.connect(SocketClient.java:178)
[TRACE]
org.apache.commons.net.SocketClient.connect(SocketClient.java:268)
[TRACE] FtpUploadTest.connect(FtpUploadTest.java:231)
[TRACE] FtpUploadTest.main_(FtpUploadTest.java:103)
[TRACE] FtpUploadTest.main(FtpUploadTest.java:57)
[TRACE]
[TRACE] [message] 534 Kerberos Authentication not enabled.
[TRACE]
[TRACE] [cause] null
[TRACE]
[TRACE] [string] javax.net.ssl.SSLException: 534 Kerberos Authentication
not enabled.
[TRACE]
The relevant snippet of code is:
String security_method = "";
int reply;
if(FtpUploadTest.rem_secure)
security_method = "TLS";
FtpUploadTest.client = new FTPSClient(security_method);
/*I have tried it with and without this next line*/
FtpUploadTest.client.setAuthValue(FtpUploadTest.user_name + ":" +
FtpUploadTest.user_pass);
System.out.println("Attempting Connect. Authvalue: " +
FtpUploadTest.client.getAuthValue());
FtpUploadTest.client.connect(FtpUploadTest.rem_srvr);
System.out.println("Connection complete");
The entire main block is put in a try, and sent to the following trace
function if there is an exception:
public static void trace(Exception e)
{
StackTraceElement[] st = e.getStackTrace();
System.out.println("[TRACE]");
System.out.println("[TRACE]" + e.getMessage());
System.out.println("[TRACE]");
for(int i = 0; i < st.length; i++)
System.out.println("[TRACE] " + st[i].toString());
System.out.println("[TRACE]");
System.out.println("[TRACE] [message] " + e.getMessage());
System.out.println("[TRACE]");
System.out.println("[TRACE] [cause] " + e.getCause());
System.out.println("[TRACE]");
System.out.println("[TRACE] [string] " + e.toString());
System.out.println("[TRACE]");
}
Any suggestions on what I should do or what I am doing wrong here? I can't
find anything that strikes me as relating to this situation in the docs, or
with google. I can't setup kerberos on the ftp server (running on an hpux
box). I have no idea why this works with the command line sftp client that
comes with any arbitrary flavor of unix, but not this api.
Thank you,
-Jim Stapleton
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org